I agree with previous comment that might be best to consider a different approach. My suggest would be write a console application and use the windows scheduler:
This will:
- Reduce plumbing code that replicates scheduler behaviour
- Provide greater flexibility in terms
of scheduling behaviour (e.g. only
run on weekends) with all scheduling logic abstracted from application code
- Utilise the command line arguments
for parameters without having to
setup configuration values in config
files etc
- Far easier to debug/test during development
- Allow a support user to execute by invoking
the console application directly
(e.g. useful during support
situations)