LeKoala\SimpleJobs\SimpleJobsSchedules
A common set of schedule
If you need more, visit http://www.cronmaker.com/
# +--------- Minute (0-59)
# | +------- Hour (0-23)
# | | +----- Day Of Month (1-31)
# | | | +--- Month (1-12)
# | | | | +- Day Of Week (0-6) (Sunday = 0)
Do every X intervals: *[fw_slash]X -> Example: *[fw_slash]15 * * * * Is every 15 minutes
Multiple Values Use Commas: 3,12,47
eg daily -> 0 0 * * *; weekly -> 0 0 * * 0; monthly ->0 0 1 * *;
- Author: Koala
Synopsis
class SimpleJobsSchedules
{
- // constants
- const EVERY_TIME = "* * * * *";
- const EVERY_FIVE_MIN = "*/5 * * * *";
- const EVERY_HOUR = "0 * * * *";
- const EVERY_DAY = "0 3 * * *";
- const EVERY_WEEK = "0 3 * * 1";
- const EVERY_MONTH = "0 3 1 * *";
- const EVERY_YEAR = "0 3 1 1 *";
Constants
Name | Value |
---|---|
EVERY_TIME | "* * * * *" |
EVERY_FIVE_MIN | "*/5 * * * *" |
EVERY_HOUR | "0 * * * *" |
EVERY_DAY | "0 3 * * *" |
EVERY_WEEK | "0 3 * * 1" |
EVERY_MONTH | "0 3 1 * *" |
EVERY_YEAR | "0 3 1 1 *" |
Methods
public
- everyDay() — Every day on hour H
- everyWeek() — Every week on day D (Sunday = 0 or 7) at H