Job is not cancel even 'MaxStartDelay' is set

33 views
Skip to first unread message

Łukasz Szczepanik

unread,
Sep 23, 2022, 8:15:07 AM9/23/22
to bareos-users
Hi,

I have one of my job configured with MaxStartDelay = 3600 to be cancel if it waits 1h for execution. Unfortunately it does not work. Anyone knows why this option might not work ?

Job {
  Name = "backup-job"
  Type = Backup
  Messages = "Standard"
  Storage = "Storage-01"
  Pool = "Pool-01"
  Client = "Client-01"
  FileSet = "Fileset-01"
  Schedule = "Cycle-01"
  MaxStartDelay = 1 hours
  Priority = 1
  RunAfterJob = "....."
  RunBeforeJob = "....."
}

There is no information about it in the log file. Just "status dir" shows me:

Running Jobs:
Console connected at 23-Sep-22 12:04
 JobId Level   Name                       Status
======================================================================
  5418 Full    client02-backup-job.2022-09-21_10.33.16_50 is running
  5580 Full    client01-backup-job.2022-09-23_10.00.00_50 is waiting for higher priority jobs to finish
====

Bruno Friedmann

unread,
Sep 26, 2022, 3:51:46 AM9/26/22
to bareos-users
Maybe because the first barrier is the fact you setup a different priority, when all other priority will have finished, then the P1 will be scheduled, and the countdown will start.

Maybe you want to try AllowMixedPriority (but playing with priority has never been a good idea ;-)

Łukasz Szczepanik

unread,
Oct 10, 2022, 7:27:02 AM10/10/22
to bareos-users
Hi Bruno,

Thanks for the answer. I checked also jobs with the same priority - same behavior. 
Maybe  'MaxStartDelay' option is not clear for me but in my opinion this is the time which elapsed from scheduled time. If this time exceed, job should be cancel.
In my case job is cancelling not according to  'MaxStartDelay'  but after first job finishes. this is not expect behavior.

Example:
1. Job_1 , Priority 10, Schedule time: 10:00 , Job duration: 2h
2. Job_2 , Priority 1, Schedule time 10:05,  'MaxStartDelay' : 3600s (1h)

In my understanding Job_2 should be cancelled at 11:05 but in fact it's cancelled at 12:00 when first job is finished.

Bruno Friedmann

unread,
Oct 10, 2022, 8:24:15 AM10/10/22
to bareos-users
Your understand is not 100% accurate, the cancel will start as soon as the scheduler will be able to do something with priority 1 
Priority took into account before anything else, that's why trying to play too much with priority can really be complicated.
Usually all jobs have the same , and the backup catalog has a higher one to be the last job of the day.

Łukasz Szczepanik

unread,
Oct 12, 2022, 8:41:34 AM10/12/22
to bareos-users
Hi Bruno,

Thanks. This is exactly my case. The Job_2(priority 1 ) is my backup catalog job. Because the job is  waiting  for Job_1(priority 10) it blocks other jobs with lowers priority.
I'm wondering is there any option to cancel this job if waiting time exceeds for example 60 min. From mu understanding 'MaxStartDelay' should be the best solution but it's not :(

Reply all
Reply to author
Forward
0 new messages