|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#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
|
|||
|
|||
|
nobody will replay to this Q already discussed X000000 times
![]() try to help your self. man is a good friend, try: man man btw: man is short for 'manual' |
|
#3
|
|||
|
|||
|
Quote:
I know. but it was running for more than a month and the cronjob stop running abruptly pls help |
|
#4
|
|||
|
|||
|
When you login your environment is set (PATH, prompt, other parameters). You can see this with the env command.
You need to get this environment setup at the start of any jobs run from cron, otherwise they (probably) won't work or won't work as they did on the command line. |
|
#5
|
|||
|
|||
|
andyblack
QUOTE=andyb1ack]When you login your environment is set (PATH, prompt, other parameters). You can see this with the env command.
You need to get this environment setup at the start of any jobs run from cron, otherwise they (probably) won't work or won't work as they did on the command line.[/QUOTE] hi, i understand ur point but where and how do i set the environment following is my cronjob file: (name : temp_cron) 0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57 * * * * /u/rshah1/temp/test.pl i did "crontab temp_cron". now where should i set environment. please give me complete command and location where to set thanks, rahul |
|
#6
|
|||
|
|||
|
You need to set the environment in the actual program that is going to run.
When running a shell script from cron you'd have commands at the top of the script to do this. Check out post "Building a 'batch job' for crontab" by rct2dotcom. In it I've listed three ways you can do this: Quote:
I've never written a perl script so don't know if you can set things like the PATH in it. If you can't then you can always call the perl script from within a shell script... |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > pls someone reply. cannot run cronjob |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|