How can we help?

Run a campaign from the task scheduler


You can find out how to configure and run campaigns from the SMS Server manager here.

Sometimes it’s useful to schedule a campaign to run at a given time or at repeated intervals.

Maybe you have a monthly mailing that runs every first Monday. Or maybe you want to send out appointment reminders to your customers every morning at 9AM.

This document explains how to run an existing campaign from the task scheduler.

1. Create a script to run the Campaign

The first thing to do is to create a script for the campaign so you can run it from the command line. This is a lot easier that it seems and you don’t need any experience with scripting to be able to do it. You can just follow the instructions here.

After following the instructions behind the link you should have a script in place called: ‘SendCampaign1.vbs‘ that is located in the directory: ‘C:\AuronScripts

2. Open task scheduler

The task scheduler is a default part of Windows and should be available on your system regardless of which version of windows you are running.

If you are on a recent version of windows you can start the task scheduler by just typing in ‘Task scheduler’ in the start menu.

Alternatively you can start it by pressing ‘Windows-key‘ + ‘r‘ and typing: ‘taskschd.msc<enter>‘.

Once in the task scheduler click on ‘Create Basic Task’ to begin the wizard.

Windows task scheduler

Windows task scheduler

3. Create a basic task

The wizard will first ask you to enter a name and description for your task.

Add basic task - Name and description

Add basic task – Name and description

The ‘trigger’ page will need you to specify the scheduler time and interval. This depends on your requirements.

In the ‘Action’ page please select ‘Start a program’, click next and specify where to find the SendCampaign1.vbs script.

Add basic task - Specify campaign script

Add basic task – Specify campaign script

Click next again and before clicking finish, check the box: ‘Open the properties dialog for this task when I click Finish’.

Add basic task - Finish

Add basic task – Finish

4. Task properties

We are now in the task properties dialog because there is one more important thing to consider: Which user is running the campaign?

With the default setting the script will only run on schedule as long as you are logged on when script should run. To make sure it always runs click on the ‘Change User or Group’ button.

In this dialog you will need to type the name of the user that also runs the SMS Server service. If you are unsure you can type in ‘SYSTEM’.

System refers to the ‘Local System’ account. This account cannot log in so there is nothing else to specify. If you have selected a different user account select the option: ‘Run whether user is logged on or not’ .

Task scheduler - Task overview

Task scheduler – Task overview

The campaign now runs unattended at the scheduled time. You can verify that it is running correctly by verifying that the new messages automatically appear in the SMS Server Manager on time.