If you would like certain Sitecore Scheduled Tasks run on a certain server instance (your CM server for example) the approach is pretty simple.
First, create a new folder under /sitecore/system/Tasks. I have a new folder called “CMSchedules“. Place your Scheduled Tasks in this folder.
Then tell Sitecore to execute these tasks. Place the following configuration on the instance you wish should run these tasks. Do not place the configuration on servers that should not run the tasks.
You need to patch the Sitecore.config (for Sitecore 8.1 and up) or web.config (for versions prior to Sitecore 8.1). Add the following to the /sitecore/scheduling section:
<agent type="Sitecore.Tasks.DatabaseAgent" method="Run" interval="00:05:00"> <param desc="database">master</param> <param desc="schedule root">/sitecore/system/Tasks/CMSchedules</param> <LogActivity>true</LogActivity> </agent>
The configuration tells Sitecore to execute all tasks in the /sitecore/system/Tasks/CMSchedules every 5 minutes.
MORE TO READ:
- Repost: All About Sitecore Scheduling: Agents and Tasks by John West
- Run Sitecore scheduled task at the same time every day by briancaos
- How To Set-Up A Scheduled Task In Sitecore by Jon D Jones
