CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Fun With Perl: Perl Quizzes - Learn Perl the Fun Way:
Need help on Running perl prg. thru cron

 



skforum
Deleted

Dec 1, 2000, 8:25 PM

Post #1 of 4 (19942 views)
Need help on Running perl prg. thru cron Can't Post

I am in desparate need of help on the execution of perl program thru cron jobs.

I have following in my cron file:
02 12 * * * /usr/bin/perl /home/user/cgi-bin/dojobs.pl

Which i want to run everyday. But when i test this program does not execuets ... I checked the var/log/spool to see whether it had executed or not .... I see there is entry at this time for CMD execution at given time. But no result since prg. was suppose to create a log report firlwhich is not there.

Please show me how to run perl program thru cron jobs.

Any help appreciated.
SK.


sleuth
Enthusiast

Dec 1, 2000, 9:30 PM

Post #2 of 4 (19942 views)
Re: Need help on Running perl prg. thru cron [In reply to] Can't Post

 
I have had the same problem, according to
http://tlc.perlarchive.com/0001/04.shtml

My code was correct, and it was running, but my script was also not making a log file that I had it do just to check if it really was working, a month passed and after yelling at my server admin because they didn't think I was right, I found out that there were over 800 emails sitting in the POP account for out server account, in each mail contained the output of the file for that day it ran, so I have no idea how cron is supposed to run a program, but obviously not the same way a browser does, I would try to make sure that the program can do everything you need it to do, by Console only, but I really don't know, I just wanted you see check that url if it helps.

Sleuth


long_beach_john
Deleted

Dec 7, 2000, 11:19 PM

Post #3 of 4 (19942 views)
Re: Need help on Running perl prg. thru cron [In reply to] Can't Post

try putting /bin/echo "coool" >/tmp/mycronloot

into cron to make sure that your crontab is running the way that you expect.

also crontab runs under its own environment, so if you are expecting anything to be in that, then you might be disappointed


datWoody
Deleted

Dec 8, 2000, 4:07 AM

Post #4 of 4 (19942 views)
Re: Need help on Running perl prg. thru cron [In reply to] Can't Post

I also had some problems running perl via cron, and the only thing I've found is that I had to put complete pathnames to all files the program uses because, as was said in an earlier post, it runs in a different environment than the one cgi's execute in.

------------------
Carpe Brie'm!
~ Seize the Cheese ~

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives