Management

Automate Common Jobs with Windows Task Scheduler

11 Nov, 2015 By: Robert Green

CAD Manager’s Toolbox: Tasks such as file backups can run on a schedule you specify.


In the last CAD Manager's Toolbox, I introduced you to a synchronization tool from Microsoft called SyncToy. This free tool gives you all sorts of capabilities for creating your own synchronized backups on a portable drive at your desktop. Its one deficiency is that it doesn't include a utility to schedule periodic backups.

The good news is that you can use Windows Task Scheduler to schedule an operation for any type of software utility that can run from a command line, including SyncToy. Here I'll illustrate how to do so with SyncToy using Windows 7 Pro (Windows 8 and Windows 10 look slightly different).

To schedule a task using the operating system:

  1. From the Start menu search bar, type in Task Scheduler to bring up the program. You will see a summary of previously scheduled tasks along the left side of the interface.


     
  2. From the Create Task menu, select Custom Task.


     
  3. Add a Task Name, then choose the Task Type to create a command task.


     
  4. For the Task Type, you can enter a name — SyncToy in this case — and then navigate to the Application EXE file for SYNCTOYCMD.EXE file, which you'll find in the Program Files folder as shown. Pointing to the associated EXE file tells Windows which program to run during scheduled operations. Note: You can schedule other applications as I'm showing here as long as they can accept command line prompts.

    You should now find yourself back at the Custom Task Type dialog box as shown:


     
  5. Click OK to accept your changes and you will now be back to the Custom Task dialog box:


     
  6. Add the -R parameter (which will RUN SyncToy to synchronize all folders) and add whatever scheduling parameters you wish.

    Note: Alternatively, you can click in the Immediately box to perform a test run of your application to verify correct operation, then set your scheduling parameters.

  7. When prompted, enter your password (so the task can run even if you're not logged in), and your new task will show up in Task Scheduler's list.


     
  8. You can now exit Task Scheduler and your SyncToy tasks will run automatically on the schedule you've set.

Admittedly, you have to do some homework on how an application runs to know which EXE file to utilize and which parameters to pass the application, but you should be able to find this information in the application's Help file (as you can with SyncToy). For those willing to dig in a bit and do the research, the reward is that you'll be more organized with less effort.


About the Author: Robert Green

Robert Green

Add comment

Note: Comments are moderated and will appear live after approval by the site moderator.

AutoCAD Tips!

Lynn Allen

In her easy-to-follow, friendly style, long-time Cadalyst contributing editor and Autodesk Technical Evangelist Lynn Allen guides you through a new feature or time-saving trick in every episode of her popular AutoCAD video tips. Subscribe to the free Cadalyst Video Picks newsletter and we'll notify you every time a new video tip is published. All exclusively from Cadalyst!

Follow Lynn on TwitterFollow Lynn on Twitter





Download Cadalyst Magazine Special Edition