On Friday 25 November 2005 22:32, Ross Boylan wrote:
> On Fri, Nov 25, 2005 at 09:10:55PM +0100, Kern Sibbald wrote:
> > On Friday 25 November 2005 20:02, Ross Boylan wrote:
> > > On Fri, Nov 25, 2005 at 07:27:28PM +0100, Kern Sibbald wrote:
> > > > On Friday 25 November 2005 19:18, Ross Boylan wrote:
> > > > > Apparently it is not possible to cancel scheduled jobs, those
> > > > > without a jobid.  I think it would be useful to do so.
>
> ....
>
> > > Can anyone describe the scenarios under which jobs get scheduled or
> > > removed from the schedule?  I'm not totally sure about the second one
> > > listed above: is it true that doing a reload can make duplicate jobs?
> > > Does it only do so if some of the parameters change?
> >
> > Technically, there are two schedulers.  The first scheduler looks at the
> > schedules the user has defined, and when the appropriate time occurs, the
> > job is run.  This is the scheduler where jobs cannot be cancelled.
> >
> > Then there is a second job scheduler that holds jobs until their
> > resources are available (i.e. enough concurrent job slots to run them). 
> > These jobs are actually running even though they are being held, and they
> > can be cancelled.
> >
> > > On deletion of scheduled jobs, I think shutting down the system and
> > > restarting it will suffice.  Also, maybe old jobs get canned after a
> > > certain time?  Again, I'm not sure what did it for me.
> >
> > Well, here we need to get the terminology straight, because with the
> > first scheduler, there is no job; there are only times in the future when
> > a job will be created (or run).
>
> What should we call those things that are scheduled but have not yet
> run?

Good question. I don't know. Maybe Scheduled Jobs as opposed to Running Jobs. 
This may be the terminology I use in the status output ???

>
> >When a job is deleted, it is removed from the
> > database, so delete is not a term to use in this Bacula context. The
> > scheduling of a job could be skipped (perhaps the user would like to
> > consider this canceling, that is OK).
>
> Is "cancel" the right word to describe what I'm looking for?  I want
> the thing that is scheduled not to run, and to be removed from the
> list of things scheduled?

More suitable word might be "skip" if you want the next scheduled time for a 
job to be skipped, or "disable" if you want to turn off all future 
scheduling ...

We might be able to do something like:

 skip job=Job-name

which would skip the next scheduled time for Job-name

and 

 disable job=Job-name

which would turn off all future scheduling of Job-name until:

 enable job=Job-name

but this is a Feature Request that someone would need to submit ... :-)

Oh, yes, disable and enable should probably work for other things such as 
Autochangers and Devices too -- hmmm perhaps even someday Storage daemons and 
Clients ...

>
> > > While I'm at it, what should bacula do if it starts up and discovers
> > > jobs whose execution time has passed?
> >
> > This cannot happen unless the clock skips time since the job will be
> > immediately started at the scheduled time.  Once a job is started and it
> > is running, it can get blocked.  There is a directive where you can
> > control how much time you want it to wait, then the job will be
> > cancelled.  Otherwise, the job is unblocked when it can be.
>
> I thought I saw this happening:
> jobs to be run at 1:05am.
> machine shutdown from a little before to a little after 1:05.
> when bacula restarts, it still shows those things to be run.

It will show only jobs scheduled in the future, not those in the past.

>
> Since this was around the same time I had things left around because
> the clock skipped forward, I might be misremembering.  Or the stuff
> that is scheduled might have been for the next day, and I didn't
> notice that.  But I thought I saw this....

I suspect you are "misremembering" as you say unless it was a problem with the 
clock skipping, in which case, Bacula pleads innocent.

>
> I guess the substantive question is what should happen if bacula is
> not running at a time something has been scheduled to run.  If I
> understand you, you are saying those jobs are never run.

Yes. There is not much else that can happen. When Bacula starts, it cannot 
start jobs in the past unless you want chaos ...

-- 
Best regards,

Kern

  (">
  /\
  V_V


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to