How to emulate cron jobs on a Windows Server?

I'm pretty sure that Windows' task scheduler can do most things that cron can do. But I might be missing something.

Edit: Reached at Settings -> Control Panel -> Scheduled Tasks


If none of the other answers work for you, here's an option:

There are a bunch of server monitoring services out there that will make an http call to your site at regular intervals (every minute if you like). You can get 5 minute intervals for free on some of them.

Create a password protected page, that performs your function (if it hasn't been done yet today) and point that service at it.

At least this way you won't have to write anything additional, and you can rest easy knowing it doesn't rely on your home machine.


Jeff Attwood at some point in the podcast mentioned a dirty hack to use the Cache Expiration Callback to fake this.

He'd insert an item in .Net's Cache, with an expiration set to 2 hours, and a callback to get called once the item expired, and that was his cron.

I think this was the article:
http://www.codeproject.com/KB/aspnet/ASPNETService.aspx?display=Print

It sucks if you ask me, but for a shared hosting solution, I can't think of anything much better.

Also, there are external cron services that you give a URL to and they will "ping" it regularly, like: (these are not free)
http://webcron.org/
http://www.webbasedcron.com/

Tags:

Asp.Net

Cron