Running a cron job manually?
Vu Pham
vu
Fri Jul 20 07:15:49 PDT 2007
On Fri, 2007-07-20 at 08:43 -0500, Michael Hipp wrote:
> Does anyone know a way to force cron to run a job manually?
>
> Explanation: I need to test cron jobs. Obviously I can run the job from
> the command line, but it generally has a very different operating
> environment than what it has when run by cron. Constantly changing the
> time in crontab is a pain as I need to do this over and over for
> testing. Is there some way to say "Hey, cron, run the job listed on line
> twelve!"
>
I don't know how to call cron to run manually as you ask, but when I
need to test my cron jobs , I often get into that same situation and my
solution is to make my test env to be alike cron's and I manually run
the command from that "cron-fake" environment.
This link shows the cron's env.
http://aplawrence.com/Unixart/crontab_not_running.html
Vu
More information about the Linux-users
mailing list