1 |
|
---|
2 |
|
---|
3 |
|
---|
4 |
|
---|
5 |
|
---|
6 |
|
---|
7 |
|
---|
8 |
|
---|
9 |
|
---|
10 |
|
---|
11 |
|
---|
12 |
|
---|
13 |
|
---|
14 |
|
---|
15 |
|
---|
16 |
|
---|
17 |
use DBI; |
---|
18 |
use DBD::Pg; |
---|
19 |
use Schedule::At; |
---|
20 |
use Time::Local; |
---|
21 |
|
---|
22 |
|
---|
23 |
$path = $0; |
---|
24 |
$path =~ s/folprep.pl$//i; |
---|
25 |
if ($path ne "./"){ |
---|
26 |
push( @INC, "$path"); |
---|
27 |
} |
---|
28 |
|
---|
29 |
require "foltialib.pl"; |
---|
30 |
|
---|
31 |
|
---|
32 |
|
---|
33 |
my $pid = $ARGV[0]; |
---|
34 |
|
---|
35 |
|
---|
36 |
if ($pid eq "" ){ |
---|
37 |
|
---|
38 |
print "usage;folprep.pl <PID>\n"; |
---|
39 |
exit; |
---|
40 |
} |
---|
41 |
|
---|
42 |
my $stationid = ""; |
---|
43 |
if ($pid <= 0){ |
---|
44 |
|
---|
45 |
$dbh = DBI->connect($DSN,$DBUser,$DBPass) ||die $DBI::error;; |
---|
46 |
$stationid = &pid2sid($pid); |
---|
47 |
&writelog("folprep DEBUG epgimport.pl $stationid"); |
---|
48 |
system("$toolpath/perl/epgimport.pl $stationid"); |
---|
49 |
}else{ |
---|
50 |
|
---|
51 |
&writelog("folprep DEBUG getxml2db.pl"); |
---|
52 |
system("$toolpath/perl/getxml2db.pl"); |
---|
53 |
} |
---|
54 |
|
---|
55 |
|
---|
56 |
&writelog("folprep $toolpath/perl/addpidatq.pl $pid"); |
---|
57 |
system("$toolpath/perl/addpidatq.pl $pid"); |
---|
58 |
|
---|