Cron expressions



Why Use Cron Expressions?


As a study investigator, you might want more advanced time based rules such as "Show a question every hour from 9 AM to 11 AM at minute 30" or "Show a question on April 15 at 9 AM." In order to create these rules, you will need to learn something called a cron expression.


How Do Cron Expressions Work?


Cron expressions are just text that have follow a specific format. For ODIN, our cron expression consists of five individual parts used for specifying the times that we want.

Title
Title
Example
Meaning
* * * * *
Every minute (1:00, 1:01, 1:02, etc)
*/5 * * * *
Every 5 minutes (1:00, 1:05, 1:10, 1:15, etc)
3/10 * * * *
Every 3, 13, 23, 33, 43, 53 minute (1:03, 1:13, etc)
15,45 * * * *
Every minute 15 or 45 (1:15, 1:45, 2:15, 2:45 etc)
0 * * * *
Every hour at minute 0 (1:00, 2:00, etc)
0 10 * * *
Every day at 10:00 AM
15 9-11,13-15 * * *
At hours 9:15 AM, 10:15 AM, 11:15 AM, 1:15 PM, 2:15 PM, 3:15 PM
0 9 15 4 *
Every April 15th at 9:00 AM
30 9 * * 1
Every Mondays at 9:30 AM
* is a wild card.
Make sure that spaces only exist between each of the five parts.

If you need a quick hand with cron strings, you can take a look at  this  online tool.