Click here to Skip to main content
15,900,258 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hello
i want to create a schedule(corn)job process which run daily or weekly to create this process in asp.net(i use linq code) which code i need?? any dll add or not??
Posted
Updated 6-Feb-12 18:25pm
v3
Comments
Sergey Alexandrovich Kryukov 6-Feb-12 4:55am    
Do you mean "cron"?
--SA

If you're talking about scheduled tasks, you may refer to the article below. This allows you to create/delete/update scheduled tasks on your server using ASP.Net.

A New Task Scheduler Class Library for .NET[^]
 
Share this answer
 
Comments
thatraja 6-Feb-12 4:57am    
Possible, good call. 5!
walterhevedeich 6-Feb-12 5:01am    
Thanks.
Martin Arapovic 6-Feb-12 7:11am    
Generally this will work on windows prior win server 2008 and 2008R2. And if he have dedicated server used to host this, because he must have access to windows scheduling service, which i doubt he have. Better solution is to use some stand alone solution like Quartz.NET...
bhavesh002 6-Feb-12 9:48am    
ok
For a functionality similar to Cron, on Windows, you need some service to schedule events and trigger them.

Such service already exists, called Windows Task Scheduler, see:
http://en.wikipedia.org/wiki/Task_Scheduler[^],
http://msdn.microsoft.com/en-us/library/aa383614.aspx[^],
http://msdn.microsoft.com/en-us/library/aa384006%28v=VS.85%29.aspx[^].

See the last link above for use of the Windows Task Scheduler. You can use its API in your program using Task Scheduler Managed Wrapper, see http://taskscheduler.codeplex.com/[^].

But if can be even simpler.
You can use Windows Task Scheduler using Windows utilities AT.EXE or SchTasks.EXE, see:
http://en.wikipedia.org/wiki/At_(Windows)[^],
http://technet.microsoft.com/en-us/library/bb490866.aspx[^],
http://en.wikipedia.org/wiki/Schtasks[^],
http://msdn.microsoft.com/en-us/library/windows/desktop/bb736357%28v=vs.85%29.aspx[^].

—SA
 
Share this answer
 
Comments
Espen Harlinn 6-Feb-12 6:23am    
Excellent, my 5
Sergey Alexandrovich Kryukov 6-Feb-12 9:52am    
Thank you, Espen.
--SA
thatraja 6-Feb-12 13:25pm    
My 5! too
Sergey Alexandrovich Kryukov 6-Feb-12 14:13pm    
Thank you, Raja.
--SA
Hi,
For .NETyou can try Quartz.NET. It has sqlserver db provider and you have examples how scheduler is used.
 
Share this answer
 
Comments
thatraja 6-Feb-12 13:24pm    
Actually I forgot the name of this one otherwise I could have answered.
Have a counter, 5!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900