I want a workflow to run each day at 2.00 AM. Is there a way to achieve this? I found many posts but didn't work.
The OOTB way to do this would be to create your workflow as you want it and add a stage at the end. In this stage put in a
Pause action. You can set this for
1 day (or
24 hours). For your
Transition to stage, have it redirect back up to the first stage.
The downside of this would be that you have to manually start it that first time. It would also be one continuous workflow rather than it being ran separately once a day.
You can use a task scheduling tool such as SQL Server Agent or Windows Task Scheduler and have that execute a PowerShell script that start the workflow.
And here is a link to run the workflow in powershell: http://www.thesysadminhimself.com/2013/09/sharepoint-start-workflow-all-items-powershell.html
The only other option I can think of is somehow converting your workflow into a timer job but I don't really know how to do that.
..Hope this helps a bit.
Do you mean Sharepoint online (as Sharepoint 2013 online does not exist)? For this task, i would recommand looking into Microsoft Flow that comes with Office 365 and can interact with Sharepoint Online list events and do executions like "wait until". Other solution is Azure webjobs trigger...
Late to the party, but we use Harepoint Workflow Scheduler for our workflow scheduling needs. It does need to be a 2010 workflow, though, so workflows created using the Harepoint Workflow Designer won't come up (it creates 2013 workflows). If, like me, you've had nothing but trouble getting Sharepoint 2016 and Sharepoint Designer 2013 to talk to each other, you may find you are able to create 2010 workflows without an issue.
I was also looking to schedule my workflow to run at a specific time each day and I ended up solving it this way.
At the very start of the workflow,
1: Set Workflow Variable Set a variable, lets call it "IsToday" to "Current date".
2: Extract Substring of String from Index with Length Start at "0" and the idea is to extract the date only from variable IsToday (not the time). So, to extract 2020-06-09 i need to extract 10 charachters from IsToday, starting at position 0. I put the result in variable "IsTodayDateOnly".
3: Add Time to Date In my case I want the workflow to run at 00:01:00 every day. So I add 1 day and 1 minute to variable "IsTodayDateOnly" and put this in variable "IsTomorrow".
At the end of the workflow,
4: Pause Until Date At the end of your workflow, have it pause until "IsTomorrow" and then direct the workflow to go back to the beginning (Transition to stage) and run again.
I hope this may be of help to others.
I'm using the 'When HTTP request is received' for SharePoint Online An Azure Runbook can be scheduled to trigger this flow.
Downside, you'll need a Premium Power Automate account and an Azure subscription. But you'll get 500 minutes runtime on Runbooks for free.
edit: I just noticed this is a pretty old question. Just my two cents