Mark Maas ha scritto: > Hi List, > > I was wondering how I could force cancelling of jobs after "x" hours > of scheduled time if they have not started yet.? > What I also tried was the "Max Wait Time" option in my jobs, but it > seems it only starts counting from the start of the job, not from > start of scheduled time. > > "Max Start Delay" is also not completely what I was looking for, it > comes close, but only applies when other jobs are running. Not when > everything is waiting for a tape/volume to be inserted. > > So to summarize, I'd like to schedule a few jobs from 23:00. And have > them automaticly cancelled at 08:00 in the morning when they still do > not have a correct volume to backup to. > > When the operator simply forgot the tape, then the backup for that > night should simply be skipped. The period of time in which the backup > was possible has passed. > > Is this possible? > > Thanks, > Mark > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > ------------------------------------------------------------------------ > > _______________________________________________ > Bacula-users mailing list > Bacula-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bacula-users > You can try in this way:
- Add in Device {} resource: Maximum Open Wait = <time> Enchanted Version: - Add in Device {} resource: Alert Command = 'bsmtp ....' to send an e-mail to tape operator. - Add in job {} resource: Reschedule On Error = yes Reschedule Interval = 2h Reschedule Times = 6 From Manual: Reschedule On Error = <yes/no> If this directive is enabled, and the job terminates in error, the job will be rescheduled as determined by the Reschedule Interval and Reschedule Times directives. If you cancel the job, it will not be rescheduled. The default is no (i.e. the job will not be rescheduled). This specification can be useful for portables, laptops, or other machines that are not always connected to the network or switched on. Reschedule Interval = <time−specification> If you have specified Reschedule On Error = yes and the job terminates in error, it will be rescheduled after the interval of time specified by time−specification. See the time specification formats in the Configure chapter for details of time specifications. If no interval is specified, the job will not be rescheduled on error. Reschedule Times = <count> This directive specifies the maximum number of times to reschedule the job. If it is set to zero (the default) the job will be rescheduled an indefinite number of times. Maximum Open Wait = time This directive specifies the maximum amount of time that Bacula will wait for a device that is busy. The default is 5 minutes. If the device cannot be obtained, the current Job will be terminated in error. Bacula will re−attempt to open the drive the next time a Job starts that needs the the drive. Alert Command = name−string The name−string specifies an external program to be called at the completion of each Job after the device is released. The purpose of this command is to check for Tape Alerts, which are present when something is wrong with your tape drive (at least for most modern tape drives). The same substitution characters that may be specified in the Changer Command may also be used in this string. For more information, please see the Autochangers chapter of this manual. Note, it is not necessary to have an autochanger to use this command. The example below uses the tapeinfo program that comes with the mtx package, but it can be used on any tape drive. However, you will need to specify a Changer Device directive in your Device resource (see above) so that the generic SCSI device name can be edited into the command (with the %c). An example of the use of this command to print Tape Alerts in the Job report is: Alert Command = "sh −c 'tapeinfo −f %c | grep TapeAlert'" ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users