[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cron job not executing



=?iso-8859-1?q?Camale=F3n?= writes:
> Here is a good collection of the common reasons why a cron job does not
> engage:
> 
> http://askubuntu.com/questions/23009/reasons-why-crontab-does-not-work

	One thing you can do is to set an "at" job to run your
script once. Go to the directory you want to run the job from
and type something like

at 12:00 may 31

after hitting enter and getting the at prompt, type the name of
the script. Hit Enter again and Control-D to save the job and
take note of the job number.

	Now do at -c job#,  whatever that is, and pipe it to a
file.

	This will be a script in and of itself and contain the
environment you had when you ran the at command. Save your path
and any other important variables and junk the rest. Now edit
your script and put the environment data at the top, editing as
appropriate.

	You can now junk the at job with atrm job#.

I have done this before when cron jobs ran manually but didn't
run under cron and at least the environment reminds you what it
should have to work correctly.

Martin McCormick


Reply to: