Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
implement crontabs #626
An early design idea for Flux was to implement "crontabs" or jobs that are run periodically for some housekeeping task the user wants.
As discussed in #604, to reduce content storage requirements, the
Crontabs seem like an easy way to handle this sort of use case.
Initially cron jobs could run outside of regular job scheduling, and could simply be launched as sub-processes of the rank 0 broker (launched in parallel with initial program). We could mimic crontab(1) behavior, e.g.
To submit a cron job:
To list crontab
Crontabs could use the crontab(5) format e.g.
With ranges, lists, and asterisk handled.
Also, similar to
I propose we do this or something like it in the near term to handle the KVS pruning use case. Feedback welcome on the design sketch.
It feels like the
I'd also prefer a named list of scheduled items rather than a static crontab, though a file that lists a large set of scheduled work is a good idea for use from an
Chronos uses ISO8601 date-times and intervals. I'm not sure if ISO8601 interval definitions are any easier to grok than crontab entries.
What if the base flux cron protocol was JSON and we just split the repeating interval into its components in the json blob, e.g.
The command to generate these requests could use ISO8601 datetimes at first, but later could be extended to take more user friendly input like
In fact, it would be kind of nice if
There should also be commands to list and cancel existing entries, e.g.
Forgot to reference this Issue in PR #659.
In that PR a cron entry has JSON of a form more like: