Skip to content

Add job groups. #4

@mark-casey

Description

@mark-casey

Add job groups.

In addition to not allowing more than one instance of a job to run at once, it would be nice to be able to group jobs so that only one job in the group can run at a time. Perhaps also implement run-order or job dependencies here and leave a temp file indicating what job ran last.

Given:
backup-job
backup-compress
backup-to-tape

If the jobs taken as a group run once daily and usually take 3 hours, and then suddenly the group takes two days instead, you'd want each job to report to you that it has skipped because either a group member is still taking forever, or because (for example) job 3 took forever and even though it is the time of day for job 2 and job 3 they report that they're skipping because job 1 is supposed to run after job 3 regardless of time of day or how long a previous run took.

Could end up in pre-script config or even in cron entries:
0 9 * * * FH_JG=143.0; /usr/local/sbin/foilhat.sh /usr/local/sbin/backup-job.sh
0 10 * * * FH_JG=143.1; /usr/local/sbin/foilhat.sh /usr/local/sbin/backup-compress.sh
0 11 * * * FH_JG=143.2; /usr/local/sbin/foilhat.sh /usr/local/sbin/backup-to-tape.sh

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions