Schedule a Workflow at Midnight Everyday

Hello all, i am fairly new to bubble, great software and a great community!

I really need help with having a workflow run automatically every day at 00:00. The workflow needs to be able change all Users “thing” to 0.

The thing is just a counter so its a number.

Can someone please guide me on this, I have read a few other threads on similar help topics as this but i still really do not understand.

Thanks so much in advance.

Also it would be good if it was based on the users timezone. I am on a paid plan if that helps.

What is your goal with this? There’s often better way to achieve what you are trying todo that will help you save on WU.

Technically, the way todo that is using a daily recurring workflow on user and schedule it at 00:00 using current date-+day(1)time:change hour to, change minute to… or use Schedule a backend WF that will schedule itself each day after.

So the app im building has a limit of the amount of messages a user can send per day. Once it hits 00:00 it auto resets all users messages count which is data type user. What would be the best way, to also save on WU, even though it will only have about 5 users hahaha!

This is not a huge user base so I don’t see a real issue for your case with WU. So daily recurring workflow set on user Datatype can work. An option could be to use a date field at the user DB to store last “reset date” and when user log in, you can check the date if not equal to “today” and reset the count to 0 in this case. So if a user doesn’t log in for a few days, instead of running a WF that will reset the count each day, it will only reset it when user use your app. But saving on WU for your case is probably not on top priority :wink:

Thank you for help so far, really appreciate. Does a recurring workflow need to be triggered to start? Do i set up a recurring workflow in the backend workflow?

You first need to create a recurring event in backend. After you can schedule it from backend or frontend but yes this need to be scheduled first.

I pretty much have this.
I have it run at 10:00am once a week in the users time zone.
I will need to change it as we’re going into summer winter time. Because time zones change in relation to UTC.

  1. In my dashboard I have a datepicker and a button, I schedule an API at the date pickers value. I always pick 00:00:00am on Monday UTC
  2. The API from 1. starts a recurring workflow at the current date/time
  3. The recurring workflow contains a “schedule an API” for each timezone with the scheduled date “current date/time+ hours eg. 58” or however many hours ahead their Wednesday 10am is.
  4. The API workflows scheduled in nr 3. contains an email.

This means that you get the email at 10am on Wednesday for wherever you are on the globe. Someone in Taipei gets it at their 10am. Someone in NY gets it at their 10am.

This topic was automatically closed after 70 days. New replies are no longer allowed.