I have a site workflow which runs for every 1 hour, But I need this to be scheduled for every 5 minutes.
How can we schedule this?
Could you just include a pause or a loop in the workflow rather than relying on a schedule?
If you really need to do this, and you're on premise with SP 2013, you might consider using PowerShell and creating a scheduled task (see code snippet below).
$username = "admin account"
$password = "admin password"
$domain = "your domain"
$wsUrl = "your site url/_vti_bin/NintexWorkflow/Workflow.asmx?WSDL"
$proxy = New-WebServiceProxy -Uri $wsUrl
$proxy.Credentials = new-object System.Net.NetworkCredential($username, $password, $domain)
[xml]$response = $proxy.StartSiteWorkflow('your site workflow name','')
But workflows don't generally start exactly on time so you'd potentially need to handle multiple workflows running simultaneously..
Hopefully others will scroll down this far and read this since its been answered, however the answer is severely flawed.
When you create a single workflow that will run literally forever you will increase your log files by a ton. It will also increase the history logging as well which will explode your database. This is very unwise. While its fine for 1 maybe 2 workflows, when you setup 100 or 1000 of them, kiss your DB goodbye. This is a very bad practice. You also have to consider you're not the only one using that SharePoint server. While you may have 1 or 2, another person may have 1 or 2 of their own, and if your company has 1000 users, well now you're looking at 2000 workflows that are running every 5 minutes against your timer job. That always ends up being the case. We have several instances where this happens on our servers and it causes other workflows to have to wait and sometimes causes errors.
Issue 2 is that if you setup a workflow that will schedule another execution of itself you'll find your workflow schedule list overloaded with Run Once executions of the workflow which means you'll have to go through and delete 12 scheduled workflows for every hour (288 per day) and yes that's a pain to go through each one, one at a time and delete especially after a long weekend or holiday where you can have 3 to 5 days or so of execution to go through. I haven't been able to pull off the web method to delete all the scheduled workflows yet either. I've been unable to get a valid authorization basic 64 byte encryption to actually work through fiddler, but that may help if you can pull it off.
Either way, both methods are very high maintenance and unwise to do. Your best bet is to use a wait trigger for whatever event your looking for so the workflow is not constantly running and updating every 5 minutes, it'll only execute when certain conditions occur. This may not always be available if you're using information from an external source, but its much better than filling up log files or timer jobs with a process that is constantly running. Your best bet is to code up a scheduled application to read the external data source on the back end through a console application or something and when the trigger is reached, have that console application run your workflow to update whatever needs to be updated, or have it flip a flag on your list that'll trigger the wait action to run. That of course takes some code.