Input - Cron

Cron (see  https://en.wikipedia.org/wiki/Cron ) is a time-based job scheduler coming from Unix systems. Cron is most suitable for scheduling repetitive tasks, but you can define a one-off cron job easily by providing an exact date and time – then you remove the interface so it will not run next year, as there is no year field.
There are two main differences between Unix cron and Apio cron format:
  • Unix cron has the command to run right after the time declaration, Apio doesn't need that, as cron module will generate an empty payload to trigger the steps afterwards.
  • Unix cron has 5 time fields, in Apio we extended it with seconds so we can run jobs in every second, every five seconds, etc.
Cron module parses your cron value and explains it in plain English

Apio Cron format

Cron style time declaration normally consists 5 – in Apio's case 6 fields
These fields will tell the cron scheduler when to run the job.
Star character ( * ) means every second, minute, hour etc.
For example running the job (creating an empty payload) every seconds in Apio cron module:
The format is value, then one space, then value, one space etc. No space before or after the expression, only one space between field values.
A number will "fix" that field to a certain value, for example running the job every minute (at 0 seconds):
Running a job every hour:
Running a job at 6:05 every morning:
To run a job every minute from 6:00 to 7:00 in the morning:
There is also a way to run jobs every n seconds, minutes, hours, days by using / (as dividing the number by a value)
Running every five minutes (at zero seconds):
The other powerful option when defining time is to provide a comma separated list of values.
Running every hour at 15 and 30 minutes mark (0:15, 0:30, 1:15, 1:30, 2:15, 2:30 etc):