Time filter
Filter scheduled executions to match both the day of the week and the day of the month
By default, the crontab uses OR when the day of the week and day of the month are specified.
For, example, 7 0 12 * Fri
will run your cronjob at 00:07 on Friday OR on day 12 of each month.
It would be impossible to require matching of both the day of the week and the day of the month using either crontab syntax or time expression.
For example, run cronjobs on Friday the 12th, or run on Tuesday and Wednesday from day 10 to day 20.
To solve this, FastCron now supports the Time filter.
To show the Time filter, click on the Filter button.
It supports simple expressions with 5 variables:
minute
: integer, from 0 to 59hour
: integer, from 0 to 23day
: integer, from 1 to 31month
: integer, from 1 to 12weekday
: string, includingMon
,Tue
,Wed
,Thu
,Fri
,Sat
, andSun
It supports a lot of operators. See the full list here.
Here are some examples for you:
- Run on Friday the 12th, at 8:00: set the expression to
1 day 8:00
(or0 8 * * *
) and the filter today == 12 and weekday == 'Fri'
- Run only on Tuesday and Wednesday, from day 10 to 20:
(weekday == 'Tue' or weekday == 'Wed') and day >= 10 and day <= 20
orweekday in ['Tue', 'Wed'] and day >= 10 and day <= 20
This feature is available in all premium plans.
← Back to blog