Categories
.NET C#.NET Programming Server Configuration VB.NET/VB

Creating Schedular application in Windows

This can be done in many ways. Often I see my collegues doing a ASP script that they schedule to run with Browser. As this seems quite obvious thing for them. An ASP scripts can run better in browser when called through IIS, and they can then schedule to run at given time and calling ASP page of their.

But this is a wrong way of doing it. Why? first, it will open your Web browser at given time, if you are on desktop machine you will see that browser popup and then navigate to your give url. Second, mostly commonly people put website url to their script such as http://www.example.com/work.asp instead of http://localhost/work.asp, this will cause your bandwidth consumption for no reason. Takes more memory then needed. and finally, it will time out if you have long execution to do.

So, what you need to do. My best bet is create your own Windows Service and install it, if your shared hosting doesn’t provide that feature, then make EXEcutable file and let your hoster schedule it for you. This file once schedule will do your desire work.

If you are using ASP.NET then it has some inbuilt support for threading, that you can start and then put in memory to run forever. However, I never work on this part but see it in action for software like DOTNETNUKE etc.

Suggest anyother method if you can please.

By Sumit Gupta

Sumit Gupta, a developer by choice.