Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

perl running using c3

Status
Not open for further replies.

CristianLuca

Programmer
Oct 25, 2007
36
RO
This is really bugging me for a while . Here is what i want to do : I made a cronjob to run at each minute a script. That script logs on diferent machines and there it starts another script and return to my main script a result. I do that using c3. When i ran the main script manually it works fine , but when i put it in a crontab it does not log on each machine to run that script. I don't have eny environment variables in those scripts so i don't get why it is working manually but not in crontab.

c3 command that i use to log on each machine and run the script. It is syntacticly correct when i perform it manually.

my $cmd = "/home/cristil/c3/cexec -f /home/cristil/c3.conf crawlerMachines: /usr/bin/perl /home/cristil/bin/crawlerStatistics/$logsFILE";
my @c3 = qx/$cmd/;


Thank you in advance,
Cristian
 
has the crontab user got different permissions to your account. To check, log on as the crontab user and try it

Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
whereis $logsFILE coming from?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[noevil]
Travis - Those who say it cannot be done are usually interrupted by someone else doing it; Give the wrong symptoms, get the wrong solutions;
 
i noticed that cexec does not return enything when it comes to crontab execution, wierd. Enyone got eny experience with this ?
 
Have you tried running it as the crontab user?

Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top