Pages

Saturday, May 1, 2010

Scheduling a Task on 500 Windows Computers

Back in 2008, I produced (if you can call it that) a series of training videos on Windows Server 2008 highlighting various features.  Those are still posted on BlogCastRepository.com, but they require a paid subscription to view them.  There are two reasons why that’s not worth pursuing at this point:

1. There are now dozens of video tutorials on the web which do a much better job of demonstrating these features.

2. The owner of BlogCastRepository.com, Brian S. Tucker, passed away sadly.  No one has been able to determine who is (or will) assume management of the site.  It is rudderless.

Anyhow, the video clips are too large to post anywhere that doesn’t charge a fee and I can’t justify the expense.  So they will just sit until the site vanishes.  I have backups, but nowhere to host them. Hint?

On to the subject…

One of my personal favorite features of Windows Server 2008 and R2, as well as Windows 7, is the new and VASTLY improved Task Scheduler.  It simply rocks.  For years I’ve used Cron, even on Windows, because it handled most of my needs better than the XP Task Scheduler or AT or even JT (ugh).  Here is just one example…

Task:  Set an identical scheduled task on multiple computers running Windows 7 or Windows Server 2008, but without using Group Policy or Group Policy Preferences.  And without using something like SCOM.

Steps:

  1. Create task on first computer and test to ensure it works properly
  2. Export task to XML file
  3. Store the XML in an accessible share on the network
  4. Run BAT file to invoke SCHTASKS /CREATE /XML <xml-file-path> on each remote computer (/S computername)

Bonus:  Modify the same scheduled task on multiple computers

Steps:

  1. Edit the task on the first computer and export to XML file (replace existing file)
  2. Run BAT file to invoke SCHTASKS /DELETE /TN <task-name> on each remote computer
  3. In the same BAT file, invoke SCHTASKS /CREATE /XML <xml-file-path> to import the task from the XML file

Examples of why you might need to change a task configuration:

  • Schedule change
  • Task change (script, program, etc.)
  • User credentials or password

2 comments:

  1. We have plenty of room if you need somewhere to host them.

    ReplyDelete
  2. That is very generous of you. But the second part of it is the relatively low production quality. Also, I recorded them when WS08 was coming out of beta and I only had partial insight into things based on what I found from poking around. I could upload a couple for you to review and see if you think they're worth posting. I don't have any desire to charge money or anything. Free is good, but only if they're of value to others.

    ReplyDelete