Documentation ¶
Overview ¶
A job runner for executing scheduled or ad-hoc tasks asynchronously from HTTP requests.
It adds a couple of features on top of the cron package to make it play nicely with Revel:
- Protection against job panics. (They print to ERROR instead of take down the process)
- (Optional) Limit on the number of jobs that may run simulatenously, to limit resource consumption.
- (Optional) Protection against multiple instances of a single job running concurrently. If one execution runs into the next, the next will be queued.
- Cron expressions may be defined in app.conf and are reusable across jobs.
- Job status reporting.
Index ¶
Constants ¶
View Source
const DEFAULT_JOB_POOL_SIZE = 10
View Source
const UNNAMED = "(unnamed)"
Variables ¶
View Source
var ( // Singleton instance of the underlying job scheduler. MainCron *cron.Cron )
Functions ¶
func Every ¶
Run the given job at a fixed interval. The interval provided is the time between the job ending and the job being run again. The time that the job takes to run is not included in the interval.
Types ¶
Click to show internal directories.
Click to hide internal directories.