|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
I have the following cron:
0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57 * * * * /v/sysadmin/sysnet/file.pl The .pl has been tried at 755 and 777 The script works if manually run by the web browser or unix command prompt, but I can't get the Cron to do it automatically i went thru the thread http://forums.devshed.com/archive/t-153308 it says "Solution: put the whole env. n the script." i m using tcsh what does this mean?? Thanks, Rahul |
|
#2
|
|||
|
|||
|
Something is not there in the cron job's environment.
Code:
0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57 * * * * /v/sysadmin/sysnet/file.pl 2>/var/adm/error.log Make the process write an error log - give the errorlog as a complete, perfect path and filename. Read the error log to find out what is causing the process to abort. |
|
#3
|
|||
|
|||
|
Your format of ,
0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57 * * * * /v/sysadmin/sysnet/file.pl is good. But try to redirect all stdout / stderr mode informations to a log file to get informations there. Reason your perl script is not running because of environment variable settings there. Crontab will be having four variables of HOME,LOGNAME,SHELL,PATH there. Try to change the SHELL=/usr/bin/tcsh.Because default shell of cron is /usr/bin/sh there. Note: Get the shell path location as which tcsh / type tcsh and substitute to SHELL variable there.Try with exporting needed environment variables to that script there. IT will work. REgards, Muthukumar. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > cannot run cronjob |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|