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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crontab commad 1

Status
Not open for further replies.

fatchoy

MIS
Jul 19, 2001
31
JP
Hi

I face some difficulty when modify my existing cronfile and
schedule a new job
eg.(10 12 * * * cd /data/schedule; ./elpida_link > /data/schedule/elpida.log)


After modify and saved the cronfile (vi cronfile) ,i issued a command "crontab cronfile" to submit the new cronfile to cron.

I wait and wait but it seem that the job didnt start at all
Anyone can help to offer some advise.

Thanks
 
Hi

I had faced a similar problem earlier when my user id was added to the cron.allow to allow me to run cron jobs. The cron daemon was not picking up my jobs.
A restart of the cron daemon did the trick. I beleive there is a patch to fix this problem.

hope this helps!!
 
Is the file still there with a file size and have you verifed that your cron entry was input correctly by using crontab -l?
 
Your only options would be to check all your cron settings ie.
crontab -l -> list cron entries
crontab -e -> edit cron entries
crontab -r -> erase cron entries (obviously don't use!)

After you edited with the -e option all is updated automatically so should work. If you still experience problems you might check things like the file permissions on the file you want to execute. Can you execute the file manually and all works fine? If yes, is your cron running as the root user and is running?

Hope you get you script running!
 
Another possibility is that the cron job isn't picking up the required PATH etc variables to run the job (cron has no or a very minimal environment of it's own). If the job runs OK from the command line, place that user's PATH in the script so that it is picked up by cron when running the job. HTH.
 
Use "crontab -e file_name" when editing a crontab file it will automatically move the new cron sched in. You can also run "crontab file_name" after editing your cron file. Things to look for read only permissions "for the user" on your cron file in var/spool/cron/crontabs and check for execute permissions on the dir. If not excuting as root check your cron.allow file in /var/adm/cron for the user.
You should also make sure your cron deamon is running.
JD...[thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top