Is it possible to skip a scheduled cron job?
Vu Pham
vu
Thu Mar 22 06:12:31 PDT 2007
On Thu, 2007-03-22 at 06:18 -0500, David Bandel wrote:
> On 3/22/07, Vu Pham <vu at sivell.com> wrote:
> > On Thu, 2007-03-22 at 14:18 +1100, James McDonald wrote:
> > > I have a cron job which runs at x time every week night is there any
> > > way of skipping one instance of execution?
> > >
> >
> > I got to similar problem. I created two other cron jobs that run one
> > minute before and one minute after the time I want to skip the original
> > job. The job at x-1m renames the original_job to temp_job, and the job
> > at x+1m renames the temp_job to original_job. This makes the cron fails
> > executing the original job at that time.
>
> Sounds to me like these two jobs should be combined into one. Again,
> cron is designed so that job execution isn't forgotten (skipped). If
> you need to skip execution, you need to include that logic in the
> script.
>
If somebody takes the idea which converts inetd to xinetd to crond, then
maybe xcrond will have options for us to be able to exclude some
execution times. :)
Vu
More information about the Linux-users
mailing list