Skip to main content
All CollectionsSupport
How do I run my background task only on the first or last day of the month?
How do I run my background task only on the first or last day of the month?

You can use timestamp filters along with a Precondition function to accomplish this.

Jake Spirek avatar
Written by Jake Spirek
Updated over a week ago

Using timestamp filters, we can format the date the way we want, and use that to check if today is the first or last day of the month.

  1. Set up a variable for today's date and use format_timestamp so we just return the number of today's date

  2. If you're checking for the last day, you can create a variable for the last day of the month and you'll use a combination of transform_timestamp (set to: last day of this month) and format_timestamp to return just the day number.

    1. If you're checking for the 1st day, you can skip this variable and just enter a 1 in the step below

  3. Use a Precondition function that checks if those two numbers match.

More Information:

Did this answer your question?