Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there something like cron jobs in IIS?

I'm developing an ASP.NET web application. There is some functionality I need to trigger every 10 minutes. So currently I'm considering a 'scheduled task' or to create a Windows service to call the URL.

But I remember once I did the same thing in a PHP web hosting space, using a cron job.

So is there anything like cron jobs in IIS?

Note: I'm not expecting to use 3rd-party online scheduler services.

like image 321
Nayana Adassuriya Avatar asked Apr 03 '14 02:04

Nayana Adassuriya


People also ask

What is the equivalent of cron in Windows?

Microsoft Windows' counterpart for cron is the Scheduled Task. Each Scheduled Task is planned by the Task Scheduler.

Is Cronjob and crontab same?

Crontab: Crontab (CRON TABle) is a file which contains the schedule of cron entries to be run and at specified times. File location varies by operating systems. Cron job or cron schedule: Cron job or cron schedule is a specific set of execution instructions specifying day, time and command to execute.


1 Answers

I agree with @Amadan - apples and oranges.

However, I would tend toward writing a custom Windows service for this purpose rather than using Windows Task Scheduler. Another SO question speaks to pros & cons of each option.

While Windows services are straightforward(-enough) to develop, you might consider the open-source Topshelf framework to ease some of the development and deployment quirks that typically come with them.

And to be fair, remember that cron is not part of PHP of course, just a tool that may be available to you in *nix PHP hosting environments: ASP.NET is no different really; the question is what cron-like tool is available to you in your ASP.NET environment that meets your requirements and you prefer.

like image 177
J0e3gan Avatar answered Oct 23 '22 19:10

J0e3gan