With our release of time conditions, we wanted to stay true to our tinkering roots and add an advanced time condition configuration through cron expressions. If you are familiar with these: this is exciting, right ? And if you have never heard about them, don’t worry, as you can read more about them below and you’ll be using them in no time!
What’s a cron expression?
A cron expression is a string that represents a schedule when you want to execute a routine. For example in this image from crontab guru we are showing you that 5 8 * 4 6,7 means “At 08:05 on Saturday and Sunday in April.”
Click here to go to this example and have a play! https://crontab.guru/#5_8_*_4_6,7
Why are they powerful?
You are not limited by what you can setup in the UI, you can create a really customised time expression that will run your logic only at times of the day/week/month/year that you specify.
You can setup a condition that sets a schedule for your routine to only run on Saturdays in February, March and April. Or only run something the 15th of every month. You can be very specific with your cron expressions!
In Apilio, you’ll be able to specify the cron expression plus a duration: this sets the length of the timeframe when you want your condition to be valid. For example, to allow a logicblock to operate every Monday at 9AM for 1 hour. This means that it will be allowed between 9AM and 10AM, on every Monday.
How do I set a time condition with a cron expression in Apilio?
These are a time condition, so head over to your condition section in Apilio:
- Go to https://app.apilio.com/conditions
- Choose new condition
- Choose type “time”
- From the dropdown, you’ll select “Advanced setup with cron”
- Fill in the details. You can use an external cron expression builder to write the expression. Enter a duration for your condition as well. Don’t forget to enter a name! You’ll be using this name in your logicblock to refer to this condition.
- Click save and you are done
As is an advanced setup that is only available for our pro-plan users, and those of you who are on your trial (as you get to test everything Apilio can do for you).
Free cron expression builders
We have used crontab guru for these examples:
But there are many others out there:
Any further questions?
If you have any other questions, please leave them below
Want to learn more about conditions? Have a look at these articles: