cron in asp.net

H

Hollow Quincy

Hi,

I would like to do some tasks every 3 minutes in asp.net application.
In my hosting I can't run 'exe' program, can't run sql server job and
can't use windows scheduler.
How can I execute tasks every 3 minutes in asp.net application ?
(I was wondering if I can do static Timer and run it every 3
minutes... is it good idea ? )

Thanks for help
 
B

Brian Cryer

Hollow Quincy said:
Hi,

I would like to do some tasks every 3 minutes in asp.net application.
In my hosting I can't run 'exe' program, can't run sql server job and
can't use windows scheduler.
How can I execute tasks every 3 minutes in asp.net application ?
(I was wondering if I can do static Timer and run it every 3
minutes... is it good idea ? )

Thanks for help

Yes. There a number of ways, but the simplest is probably to start a new
thread (at application start-up), then leave it to loop doing what ever it
needs to do with a Threading.Thread.Sleep(180000) at the end or start of the
loop.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top