Setting up workflow execution to run exclusively on Sunday

I need help with scheduling a specific workflow to execute only once per week on Sundays. I have a main workflow called ‘process_weekly_error_cleanup’ that should only trigger on Sundays. I’ve set up a parent workflow that’s supposed to call this ‘process_weekly_error_cleanup’ workflow, but I’m not sure what condition or logic I need to use to make sure it only runs on Sunday and not on other days of the week. What’s the proper way to configure this day-specific trigger condition?

it really depends on the tool you’re using. most of em have a day filter option. usually, sunday is represented as 0 or 7. if you’re doing cron jobs, you could use 0 0 * * 0 to make it run at midnight on sundays.

I skip the cron scheduling and just put a date check right in the workflow.

Throw a condition node at the top of your process_weekly_error_cleanup that checks if it’s Sunday. Use new Date().getDay() === 0 since Sunday = 0.

Not Sunday? Kill the workflow. Sunday? Run your cleanup.

Way more reliable this way. Even if the parent workflow fires on the wrong day, cleanup won’t actually happen. I’ve watched too many cron expressions get screwed up and break things.

Toss in some logging when it skips so you can see what’s going on.