You need to sign in to do that
Don't have an account?

How to run a flow every hour?
Hello,
I am aware that we can run flows normally every day at a specific time, but how can we run it every hour, I need my certain Cases to be edited every hour. To be specific, when record is edited it will trigger a record-triggered flow which will do an action.
There is also an app --> https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000FZ981UAD&tab=r
But this is not working for me, I can see apex job running but my Cases are not updated.
Can you help, I am sure it is possible to do atleast with Apex Jobs
Just some heads-up:
Here is the official documentation for considerations on scheduled flow
https://help.salesforce.com/s/articleView?id=sf.flow_considerations_trigger_schedule.htm&language=en_US&type=5 (https://help.salesforce.com/s/articleView?id=sf.flow_considerations_trigger_schedule.htm&language=en_US&type=5)
All Answers
Hi Dharmin,
You can try the Apex Scheduler coding part. This method is more complex, but it allows you to schedule a single flow to run every hour.
To do this, you will need to create a custom Apex scheduler class. This class will need to implement the Schedulable interface.
Once you have created the scheduler class, you will need to schedule it to run every hour. You can do this using the System.schedule() method.
For more information on how to create a custom Apex scheduler, please refer to the Salesforce documentation:
Apex Scheduler
https://developer.salesforce.com/forums/?id=9062I000000DGxwQAG
However, this idea is already discussed on Ideas exchange on Salesforce as it is not directly available. Below is the link for the same.
https://ideas.salesforce.com/s/idea/a0B8W00000GdhJkUAJ/hourly-scheduled-flows
Please mark this as a best answer if this helps you!
Hi Dishant,
Thanks for the reply.
I have created a class which runs the flow successfully but I get this error: "If you use a record variable to update or delete records, the ID value in the variable must be populated."
Something like this:
Here is the anonymous code:
Seems like Flow is not grabbing the recordId in between, do I need to pass it somewhere?
Just some heads-up:
Here is the official documentation for considerations on scheduled flow
https://help.salesforce.com/s/articleView?id=sf.flow_considerations_trigger_schedule.htm&language=en_US&type=5 (https://help.salesforce.com/s/articleView?id=sf.flow_considerations_trigger_schedule.htm&language=en_US&type=5)