2

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.

7 Answers 7

11

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.

7
  • If I pause it for 24 hours, it will load after 24 hours and execute. Will it again pause for 24 hours?
    – Keerthi
    Commented Apr 13, 2015 at 19:36
  • Yes, it will keep looping until you cancel the workflow. If you want to test it out, I would suggest doing a 5 minute pause just so you can get a feel of what will happen and see for yourself without having to wait a full day.
    – Jordan
    Commented Apr 13, 2015 at 19:38
  • I paused it for 1 minute and started the workflow (starts when new item is created). It emailed after 1 minute but it stopped executing after that. The status of workflow changed to completed.
    – Keerthi
    Commented Apr 13, 2015 at 19:55
  • Put the pause at the end of the workflow and then point the transition to stage back to the first stage of your workflow. You should get the email right away, then have it pause, then receive another email after a minute.
    – Jordan
    Commented Apr 13, 2015 at 19:58
  • 4
    As far as I know, this solution will only work in a 2013 workflow. You would have to build your workflow using that platform.
    – Jordan
    Commented Apr 13, 2015 at 20:16
3

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.

2
  • I'm using SharePoint 2013 online. How to do a task scheduler fro this?
    – Keerthi
    Commented Apr 13, 2015 at 19:15
  • ahh.. good point.. so I guess this solution is not good for you then..
    – Alboman
    Commented Apr 13, 2015 at 19:29
2

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...

https://medium.com/@rjesh/microsoft-flow-pause-till-date-ecec207522d8

1

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.

0

You can use PowerShell script. and schedule it with windows task scheduler.

1
  • it is not a valid solution. He mean SharePoint Online.
    – Hector
    Commented Jul 9, 2020 at 9:36
0

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.

0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.