views:

36

answers:

2

We have a series of nightly batch jobs running as Windows Scheduled Tasks. Their numbers have grown to a point that they are beginning to step on each other since there are no dependencies between the batch files, just start times. We are considering the use of PowerShell to write scripts to control the nightly cycle...can anyone confirm we are making a sound choice. Is there a better way to create a nightly batch job scheduler (other than purchasing a product ) or is PowerShell the recommended method for such tasks.

Thanks for your response.

A: 

I don't think PowerShell will help much with your specific problem of scheduling and dependency management. But it may be a good idea for the actual jobs.

For scheduling, maybe you should look at a free build management tool like CruiseControl or Luntbuild. Such tools are built to handling scheduling and dependency management for many jobs.

JasonMArcher
+1  A: 

Powershell would be a reasonable place to start. You could dispense with the Windows scheduler altogether and run a Powershell script as a service (using something like SRVANY.EXE). There may even be a "native" way of getting Powershell to run as a service.

Your job definitions, dependencies, failure actions, Etc., could be stored in XML format, which can easily be read by Powershell.

The only area I can see being an issue is the required accuracy of scheduling, i.e.: does it have to be to the second?

PowerShell has some nifty job execution cmdlets, see start-job, get-job and receive-job.

Simon Catlin