Scheduling to run a macro on every hour

c#, macros, umbraco

Solution

There are two ways to run scheduled tasks in Umbraco:

- Add tasks to `umbracoSettings.config`. See Scheduled Tasks from the Umbraco Wiki.

- Use the TaskScheduler package.

TaskScheduler provides a nice interface to setup tasks in the Umbraco backend. You can schedule tasks to run at specific times and you can set the recurrence. It also can send emails when tasks are executed.

Adding tasks to `umbracoSettings.config` may be simpler. Below is an example:

<scheduledTasks>
    <!-- add tasks that should be called with an interval (seconds) -->
    <task log="true" alias="test60" interval="60" url="http://localhost/umbraco/test.aspx"/>
</scheduledTasks>

Problem

Is there anyway to schedule a macro in Umbraco or a .ascx file to run every hour? thanks

Original source