EasyCron supports all cron expressions that you can find in general Linux Cron implementations.
Let's see some quick examples first.
|0 12 * * *||Fire at 12pm (noon) every day|
|15 10 * * *||Fire at 10:15am every day|
|15 10 * * ?||Fire at 10:15am every day|
|* 14 * * *||Fire every minute starting at 2pm and ending at 2:59pm, every day|
|0/5 14,18 * * *||Fire every 5 minutes starting at 2pm and ending at 2:55pm, AND fire every 5 minutes starting at 6pm and ending at 6:55pm, every day|
|0-5 14 * * *||Fire every minute starting at 2pm and ending at 2:05pm, every day|
|10,44 14 * 3 3||Fire at 2:10pm and at 2:44pm every Wednesday in the month of March.|
|15 10 * * 1-5||Fire at 10:15am every Monday, Tuesday, Wednesday, Thursday and Friday|
|15 10 15 * *||Fire at 10:15am on the 15th day of every month|
|15 10 L * *||Fire at 10:15am on the last day of every month|
|15 10 * * 5L||Fire at 10:15am on the last Friday of every month|
|15 10 * * 5#3||Fire at 10:15am on the third Friday of every month|
|0 12 1/5 * *||Fire at 12pm (noon) every 5 days every month, starting on the first day of the month.|
|11 11 11 11 *||Fire every November 11th at 11:11am.|
|0 0 * * 3||Fire at midnight of each Wednesday.|
|0 0 1,2 * *||Fire at midnight of 1st, 2nd day of each month|
|0 0 1,2 * 3||Fire at midnight of 1st, 2nd day of each month, and each Wednesday.|
A CRON expression that EasyCron supports is a string comprising five fields separated by white space. Fields can contain any of the allowed values, along with various combinations
of the allowed special characters for that field. The fields are as follows:
|Field Name||Mandatory||Allowed Values||Allowed Special Characters|
|Minutes||YES||0-59||, - * / R|
|Hours||YES||0-23||, - * / R|
|Day of month||YES||1-31||, - * ? / L W|
|Month||YES||1-12||, - * /|
|Day of week||YES||0-7||, - * ? / L #|
Above special characters are supported in several most popular Cron implementations (Cronie, Vixie cron and Quartz java scheduler, etc.).
While normally the job is executed when the time/date specification fields all match the current time and date, there is one exception: if both "day of month" and "day of week" are restricted (not "*"), then either the "day of month" field (3) or the "day of week" field (5) must match the current day.