473,386 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

scheduling thru posting on a public webhost??

Hi!

If I understand caching properly:

1. Create object in cache and set expiration Time to let's say 1 minute
2. Specify delegate which will be called on object expiration. Here we will
restore object and do some other stuff.

Basically we have timer-like application which lives by itself without
user's hitting website.

Does anybody use this technique to schedule events or some specific
processing?
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.657 / Virus Database: 422 - Release Date: 4/13/2004
Nov 18 '05 #1
2 1091
A more explicit way to handle scheduled / timed events from inside an
ASP.NET application is to create a System.Timers.Timer object during
the Application_Start event in global.asax.

i.e.

protected void Application_Start(Object sender, EventArgs e)
{
System.Timers.Timer myTimer = new System.Timers.Timer();
myTimer.Enabled = true;
myTimer.Interval = (60000 * 15);
myTimer.Elapsed +=
new System.Timers.ElapsedEventHandler(myTimer_Elapsed) ;

}

protected void myTimer_Elapsed(
object sender,
System.Timers.ElapsedEventArgs e
)
{
// do some work
}
I wouldn't use the cache expiration to do anything other than refresh
the cache. Any other behavior might not be obvious to someone coming
in to do maintenance on the softwrae.

HTH,

--
Scott
http://www.OdeToCode.com
On Sat, 24 Apr 2004 00:07:18 -0500, "Ivan Demkovitch" <a@nospam.com>
wrote:
Hi!

If I understand caching properly:

1. Create object in cache and set expiration Time to let's say 1 minute
2. Specify delegate which will be called on object expiration. Here we will
restore object and do some other stuff.

Basically we have timer-like application which lives by itself without
user's hitting website.

Does anybody use this technique to schedule events or some specific
processing?
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.657 / Virus Database: 422 - Release Date: 4/13/2004


Nov 18 '05 #2
Whatever you do, note that your schedule will stop when the server is
rebooted, or IIS is restarted.
Then you'll have to wait until the first visitor visits your page ...
Hopefully you have a real busy page ...

Wim

"Scott Allen" <bitmask@[nospam].fred.net> wrote in message
news:gg********************************@4ax.com...
A more explicit way to handle scheduled / timed events from inside an
ASP.NET application is to create a System.Timers.Timer object during
the Application_Start event in global.asax.

i.e.

protected void Application_Start(Object sender, EventArgs e)
{
System.Timers.Timer myTimer = new System.Timers.Timer();
myTimer.Enabled = true;
myTimer.Interval = (60000 * 15);
myTimer.Elapsed +=
new System.Timers.ElapsedEventHandler(myTimer_Elapsed) ;

}

protected void myTimer_Elapsed(
object sender,
System.Timers.ElapsedEventArgs e
)
{
// do some work
}
I wouldn't use the cache expiration to do anything other than refresh
the cache. Any other behavior might not be obvious to someone coming
in to do maintenance on the softwrae.

HTH,

--
Scott
http://www.OdeToCode.com
On Sat, 24 Apr 2004 00:07:18 -0500, "Ivan Demkovitch" <a@nospam.com>
wrote:
Hi!

If I understand caching properly:

1. Create object in cache and set expiration Time to let's say 1 minute
2. Specify delegate which will be called on object expiration. Here we willrestore object and do some other stuff.

Basically we have timer-like application which lives by itself without
user's hitting website.

Does anybody use this technique to schedule events or some specific
processing?
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.657 / Virus Database: 422 - Release Date: 4/13/2004

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Gilles Leblanc | last post by:
Hi I have started a small project with PyOpenGL. I am wondering what are the options for a GUI. So far I checked PyUI but it has some problems with 3d rendering outside the Windows platform. I...
1
by: Grandma Wilkerson | last post by:
Hi, The documentation states that enumeration through a collection is inherently NOT thread-safe, since a thread which added/removed an item from said collection could screw up the thread that...
6
by: Tony Proctor | last post by:
Hi everyone We're experiencing some serious anomalies with the scheduling of ASP threads. I'd be interested to hear if anyone knows what algorithm is used (e.g. simple round-robin, or something...
1
by: jeffb | last post by:
I am interested in finding out how DB2 DBAs automate tasks/jobs in their environments. What platform do you run DB2 on (Unix, Linux, Mainframe, Windows)? If you currently have a solution, what...
3
by: Alphonse Giambrone | last post by:
Can anyone point me toward a good example of an asp.net scheduling app? Preferrably in vb.net. TIA -- Alphonse Giambrone Email: a-giam at customdatasolutions dot us
2
by: Dean Slindee | last post by:
Is there any way to refer to the .text property of a status bar panel thru object syntax, like below (the inner "for" does not work): Public Function FormStatusBarPaint(ByVal frm As Form)...
1
by: Majed | last post by:
hi I'm planing to make scheduling app and need your advice on the best way to do that,and how to save the tasks to be executed and retrive their data at the right time. your input will be highly...
4
by: Dinsdale | last post by:
I'm looking at adding scheduling features to an application and I wanted to ask the community about any experience with scheduling components, either open source like from code project or from a...
2
Ritchie
by: Ritchie | last post by:
Please can anyone help me with d programs in C for CPU scheduling: WAP to show FCFS scheduling algorithm. WAP to show SJF scheduling algorithm. WAP to show Priority scheduling algorithm. WAP...
112
by: Prisoner at War | last post by:
Friends, your opinions and advice, please: I have a very simple JavaScript image-swap which works on my end but when uploaded to my host at http://buildit.sitesell.com/sunnyside.html does not...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.