You Want to Run it When?
Okay, this is all great while you are sitting in front of the server running the Relations, but what about at 3 a.m. when you need the Relation to kick off? This is where the final component of SureSync comes in: the Scheduler.
The Scheduler allows you to create a schedule (or task) that will initiate one or more Relations, and you can even create a script (.vbs or .bat) to be initiated both before and after the job has finished.
Let's take a look at scheduling your new Relation. Within the main SureSync window, select File, New, Schedule. This will launch the SureSync Schedule Wizard, as shown in Figure 10.
Figure 10 Set up a new Schedule for the Relation.
Once again, you are going to take a look at the most prudent parts of the wizard. Don't worry; the wizard is pretty self-explanatory.
Enter a name that you will easily recognize for your new schedule and a description if you wish. Once done, click on Next, and you will see a screen like the one shown in Figure 11.
Figure 11 Specify the Relation involved in the Schedule.
This screen allows you to choose the Relation that you want to schedule. Because I have only created one, that's all you see. However, if you have multiple Relations, you can select which ones you want involved, as well as the order of precedence (which one comes first). This feature was very handy for the publishing process that I implemented recently. All of the local stores could be replicated to first, and the slower stores came later.
When you have selected the Relation, click on Next. In the next screen, select the option to Run multiple times. This allows you to have a schedule that fires repeatedly until you cancel it. I am pretty sure that you can figure out what the other two options offer. Click on Next.
In the next screen of the wizard, you can specify on which days of the week, days of the month, weeks of the month, and months of the year that you want your schedule to run. Select the Every Day option. If you select the other options, you will have different screens in the wizard appear, based on your selection. Once done, click Next, which will give you a screen similar to the one shown in Figure 12.
Figure 12 Specify how often the Schedule should run (every five minutes).
Finally, you are getting into the nitty-gritty of the Scheduler. You can configure how often and when during the day your Relation will run. You can also specify what happens if the job fails.
You are going to set your schedule to run every five minutes, from 12:00 a.m. to 12:00 p.m. Although I do not recommend this for a production scenario, it will aid you no end for your testing of the Relation that you have just configured.
Select the Run schedule multiple times each day option, and set the Run every option to 0:05. Once you are done, click on Next.
The next screen in the wizard allows you to specify when the first schedule will kick off and at what time. The default is the current date and time of your server. This suits you fine for your needs, so accept the default and move on. Oops! By the way, the option at the bottom allows you to put the schedule on hold until you are ready for it to fire. Click on Next.
The next screen is once again not relevant to what you are up toit allows you to configure when the schedule will expire, what server the schedule runs on, the size and type of files, and so on. This is great flexibility for setting up the perfect replication process, and some of those very demanding user requirements! Anyway, accept the defaults, and click on Next.
In the next screen, shown in Figure 13
Figure 13 SureSync can run a batch file when the Schedule initiates, as well as when it terminates.
What I usually do to see if the scheduling service kicks off well is to write a simple batch file that uses Net Send to send a message to another server. This indicates when the schedule initiates and terminates. A crude but simple debugging process! Now click on Next, and you will be at the final screen of the wizard. This screen simply summarizes the dates that the schedule will run. I think you get the picture, so when you are ready, click on Finish.
Sure Sync will now prompt you to connect to the Scheduler (see Figure 14). This ensures that Sure Sync can contact the Scheduler (this can be the server you are running on or another server with SureSync installed).
Figure 14 SureSync confirms that you need to connect to the Scheduler (a Windows service) before you can proceed.
Once you click on Yes, SureSync will attempt to contact the Scheduler. If you haven't configured a scheduler or started the scheduling service on your local machine, SureSync will prompt you to start the Scheduler locally, as shown in Figure 15.
Figure 15 SureSync needs confirmation that the Scheduler service is to run on the Local Machine.
SureSync will now kick off the schedule (if you accepted the defaults of the wizard for starting the schedule); you will see the little icon next to the schedule name in the main SureSync turn green like a traffic signal.