cronwhip

2015-03-06 00:35 UTC
  • Xyne

Metadata

Description:

Run missed cronjobs.

Latest Version:

2015

Architecture:

  • any

Dependencies:

  • python3
  • sysvinit-tools

Arch Repositories:

  • [xyne-any]
  • [xyne-i686]
  • [xyne-x86_64]

AUR ID:

154461

Arch Forum ID:

57973

Tags:

Help Message

$ cronwhip --help

usage: cronwhip [-h] [-n] [-v] [--start START] [--end END]
                [--interval INTERVAL] [--show-missed] [--skip <filepath>]
                [--crontab <filepath>]

Run missed cronjobs that would have been run while the system was down. It
should be run once right after startup.

optional arguments:
  -h, --help            show this help message and exit
  -n, --dry-run         Print the list of cronjobs that would be run.
  -v, --verbose         Switch to verbose mode.
  --start START         Start of missed interval. If none is given, the system
                        shutdown time recorded in wtmp will be used.
  --end END             End of missed interval. If none is given, the system
                        reboot time recorded in wtmp will be used.
  --interval INTERVAL   The length of the missed interval, in hours. Non-
                        integer values are allowed. The interval is calculated
                        from the start time, unless the "end" option is given
                        without the "start" option. For example, use "--end
                        now --interval 2" to run all jobs from the last 2
                        hours."
  --show-missed         Show the list of missed cronjobs.
  --skip <filepath>     A list of jobs, one per line, that should not be run.
                        Only the command should be included on the line.
  --crontab <filepath>  A file containing a list of jobs in crontab format.
                        Use "-" to parse STDIN.

The start and end times may be given with the format "YYYY-mm-dd HH:MM" or as
"now", "shutdown" or "reboot".

README

TODO

  • Maybe add support for setting the interval based on log-in times.

cronwhip.pl

The included file cronwhip.pl is the original implementation of cronwhip. It is an ugly hackjob that works, and it is included for anyone who does not want to install Python 3 to run the new version. It is no longer maintained but it should continue to work as long as the output of the commands last -x and crontab -l remain unchanged.

CHANGELOG

2015-02-23

  • Update to use modern string formatting.
  • Add option to read crontab from file or STDIN.

2013-11-23

  • added command-line options for configuring the interval

2012-11-25

  • added service file

2012-02-26

Cronwhip has been converted to a Python 3 module. The module itself is small and can still be used as a stand-alone script, but it can now be used to write other scripts.

The new option --show-missed prints a list of all the missed cronjobs and when they would have been run.

Contact
echo xyne.archlinux.ca | sed 's/\./@/'
Feeds
Blog News
Validation
XHTML 1.0 Strict CSS level 3 Atom 1.0