For Monthly recurring API workflows, my understanding is that they are scheduled for 30 24 hour days from now.
A recurring workflow that ran at 2:00 PM on March 8 (today) was rescheduled for 3:00 PM on April 8 (31 days from now, after DST starts in the US).
This test suggests that the date is either the same number for next month’s date, or 31 days from now.
Anyone have any insights as to what the expected behavior of the recurring workflows are?
Daylight saving I believe. Same thing happened to me with a similar workflow. You should be all good!
Yeah it’s daylight savings. I’m more wondering about how the workflows are scheduled - can I count on the recurring workflows to schedule a workflow within each month?
Because the date math in recurring workflows is not well documented, I’ll probably build in custom date math to ensure that a “recurring workflow” started on for example March 31 will run on the 28th of all subsequent months.
I see. So this way, you’ll ensure that a workflow is run every month, not necessarily every 30 or so days. If the documentation isn’t great, you may just want to test manually first.
Create a new database table called Date. It’ll have 3 fields. A number field called id (the item number), a number field called month (it’ll hold a date’s month), and a date field (which will obviously hold a date)
Create a test page with a button and a date picker. Set the date picker to any time & date. When you click the button, a “Date” is created. It’s id should be 1 for the first Date, 2 for the second Date, etc. The date field should have the date from the datepicker. The month field should have the month extracted from the date picker’s date. Have a reset inputs action after this is done. Now go back to the date picker. Set it’s initial content to “Search for Date’s (sorted by id / descending is yes):first item’s date:+1 month”.
Now you can just keep clicking the button to see how date’s work on a monthly basis. To make this even easier to view, set up a repeating group on this page that shows the id, month, and date (including the time).
Hope this can give you more clarity,
Thanks for the thorough response, Daniel! It really is helpful.
So are we assuming that the date logic used in the monthly recurring workflows is identical to the date logic used in the “+1 month” step? Are we sure that this is the case? I wasn’t able to find confirmation of this anywhere on forum posts or in the manual/reference docs.
My test looked like this:
Set a monthly recurring API workflow to run now.
See when the next monthly workflow has been scheduled for the next month in the “Scheduler” part of the “Logs” tab of the Bubble editor.
I would assume so. From your March 8th @ 2pm to April 8th @ 3pm example, it seems like it’s correct (Daylight savings being the reason for the time difference).
The test I explained would allow you to select January 30th, then you’ll see if February 28th becomes the next date. Make sense?
The logic appears to be different on my test app. When done on the page, the scheduler appears to account for the DST change that happens in the time zone of the client’s computer.
Looks like my question has been answered about a “Monthly” function not running each calendar month, but instead running based on a certain length of time that is defined as a “Month” across all bubble apps.
Thanks again for your help testing, Daniel! Here’s the results of the short test you described:
That’s unfortunate! Hopefully, you can find a workaround for your app. Conditionals maybe? Anyways, good luck,