This documentation applies to the latest version of hitchcron.
HitchCron is a Hitch Plugin created to make testing applications that rely upon a cron or cron-like service.
- A Service that runs during the whole test that runs a command periodically (typically every second).
$ hitch install hitchcron
Set up Cron¶
See also: Generic Service API
To use, define the service after initializing the Service Bundle object but before starting it:
import hitchcron self.services['Cron'] = hitchcron.CronService( run=['command', 'arg1', 'arg2', 'arg3'], # Mandatory - list containing command + args every=1, # Optional (Default: run every 1 seconds) )