473,806 Members | 2,583 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1102
A more explicit way to handle scheduled / timed events from inside an
ASP.NET application is to create a System.Timers.T imer object during
the Application_Sta rt event in global.asax.

i.e.

protected void Application_Sta rt(Object sender, EventArgs e)
{
System.Timers.T imer myTimer = new System.Timers.T imer();
myTimer.Enabled = true;
myTimer.Interva l = (60000 * 15);
myTimer.Elapsed +=
new System.Timers.E lapsedEventHand ler(myTimer_Ela psed);

}

protected void myTimer_Elapsed (
object sender,
System.Timers.E lapsedEventArgs 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.c om...
A more explicit way to handle scheduled / timed events from inside an
ASP.NET application is to create a System.Timers.T imer object during
the Application_Sta rt event in global.asax.

i.e.

protected void Application_Sta rt(Object sender, EventArgs e)
{
System.Timers.T imer myTimer = new System.Timers.T imer();
myTimer.Enabled = true;
myTimer.Interva l = (60000 * 15);
myTimer.Elapsed +=
new System.Timers.E lapsedEventHand ler(myTimer_Ela psed);

}

protected void myTimer_Elapsed (
object sender,
System.Timers.E lapsedEventArgs 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
2898
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 know of WxPython but I don't know if I can create a WxPython window, use gl rendering code in it and then put widgets on top of that...
1
2099
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 was iterating. That makes sense.. but... given a collection that is filled at start-time and never modified again, is it safe to have multiple threads *reading* (not writing to) the collection using foreach()? I have a class that exposes an...
6
2329
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 more sophisticated), and what situations might perturb it. Even a hint as to what would be considered normal scheduling might help. The root of our problem is that we observed a normally well-behaved web application suddenly limit itself to a...
1
2935
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 product do you use? Do you see Job Scheduling as a DBA's responsbility? Do you consider database monitoring/health as a DBA's responsibility?
3
578
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
1399
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) As Integer Dim obj As New Control
1
1808
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 appreciated Majed
4
2849
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 vendor. I'd like to be able to create schedules and lock resources for things like collision detection (two events trying to use the same resource). I've seen some GANTT charting components but I don't think that's what I'm looking for. I'd...
2
26819
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 to show Round-Robin scheduling algorithm. disk scheduling:
112
4774
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 work. To rule out all possible factors, I made up a dummy page for an index.html to upload, along the lines of <html><head><title></title></ head><body></body></html>.; the image-swap itself is your basic <img src="blah.png"...
0
9719
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9598
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10373
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7650
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6877
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5546
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4330
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3852
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3010
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.