Cron is a UNIX tool that has been around for a long time, so its scheduling capabilities are powerful and proven. The CronTrigger class is based on the scheduling capabilities of cron.
CronTrigger uses “cron expressions” for scheduling .
* * * * * command to execute
– – – – –
¦ ¦ ¦ ¦ ¦
¦ ¦ ¦ ¦ ¦
¦ ¦ ¦ ¦ +—– day of week (0 – 7) (0 to 6 are Sunday to Saturday, or use names; 7 is Sunday, the same as 0)
¦ ¦ ¦ +———- month (1 – 12)
¦ ¦ +————— day of month (1 – 31)
¦ +——————– hour (0 – 23)
+————————- min (0 – 59)
Some Example according to cron Expresssions :-
Some cron examples ,
Expression | Execution Detail | Comment |
5 2 * * 6 | This CRON job starting at Current-DateTime (now), it would run:
|
Once in a week |
5 2 * * * | This CRON job starting at Current-DateTime (now), it would run:
|
Once in a Day |
5 */12 * * * | This CRON job starting at Current-DateTime (now), it would run:
|
Twice in a Day |
5 */6 * * * | This CRON job starting at Current-DateTime (now), it would run:
|
4-times a Day |
Best Open Source Business Intelligence Software Helical Insight is Here
A Business Intelligence Framework
Subscribe
Login
0 Comments