Warning!
This is a legacy document. The features described below are only usable within the classic generation environment. Looking for a way to create a scheduled action in the next-gen? Have a look right here!
CRON
To trigger these processes at a scheduled moment, you'll need to give the action command. These commands come in the form of crontab lines. Cron is a piece of software that interprets a combination of characters and converts it to an array of timestamps on which your action will be executed. The term cron is based on the name Chronos, which is the Greek personification of time.
Examples
Let's take a look at the most simple example:
* * * * *
An asterisk (*
) is an often-used character for wildcards in computer science. It indicates every or all values are accepted. This works somewhat the same here: 5 asterisks indicate the action has to be executed every minute, every hour, every day, every month.
Some other examples are:
Every 12 hours:
0 */12 * * *
Every first day of the month at noon:
0 12 1 * *
Every 15 minutes on every day from January until June:
*/15 * * 1-6 *
Every hour from 9 until 5, from Monday until Friday:
0 9-17 * * 1-5
You can make it as complex and versatile as you want, as long as it follows the cron syntax: 5 values, separated by spaces. Now you understand this syntax, you can type your own schedules. However, it's easier to use a generator that builds you a command like this one here: Crontab generator
Adding a schedule to your action
Open the action's settings and look for Triggers. By default, an action is set to Manual, so you can start it, you guessed it, manually. We'll set our action to Scheduled.
Right after clicking, a new input field appears. This is where the crontab line is entered.
In this example, we're scheduling an action to send an overview of activities of last week, every Monday at 9. Save your action and the action will be queued whenever the schedule is met.
Note: Adding a schedule to an action in an application's sandbox will not result in an automated action. Only production environments trigger scheduled actions. Merge the schedule added in the sandbox to your production environment to see it in effect.
Schedule
In the action overview, you'll find a column that displays the action's schedule.
The crontab is converted to a more readable value, our example resulted in at minute 0, on hour 9, every day, on Mon
.