firing once a day

J

JP.Gantlin

i gotta routing to fire off once a day,

I figure the first hit of each day will cause it to run.
would i keep track of that in the global.asax and a session variable?
 
M

Mark Rae

i gotta routing to fire off once a day,

What sort of routine...?
I figure the first hit of each day will cause it to run.

You mean the first time someone hits your website and, therefore, runs
Application_Start on any given day...?
would i keep track of that in the global.asax and a session variable?

Clearly you can't store this in a Session variable, because that will be
lost as soon as the Session times out automatically or is torn down
manually...

You also can't store this in an Application variable (I presume that's what
you mean by "keeping track of it in global.asax"?), because all your
Application variables will disappear when the last remaining Session times
out automatically or is torn down manually and Application_End fires...

The reason I asked what sort of routine this is is because, generally
speaking, ASP.NET is not particularly suited to this sort of thing for
precisely the above reasons - a Windows service or a SQL Server job would
almost certainly be a much better solution, if they are available to you...
 
J

Jon Paal

you could put it into the session start section , checking the date and status, before firing.
 
M

Mark Rae

you could put it into the session start section,

Which would mean that every new visit to the site would (try to) run this
whether it needed to or not...
checking the date and status, before firing.

"Checking" how, exactly...? If you mean checking against a database, then
every Session_Start is going to make a completely unnecessary database
call...
 
J

JP.Gantlin

"Checking" how, exactly...? If you mean checking against a database, then
every Session_Start is going to make a completely unnecessary database
call...
not if i also used an application variable..?
 
J

JP.Gantlin

The reason I asked what sort of routine this is is because, generally
speaking, ASP.NET is not particularly suited to this sort of thing for
precisely the above reasons - a Windows service or a SQL Server job would
almost certainly be a much better solution, if they are available to
you...
yes, I don;t have access to these things.. is the problem...

it is a send a reminder email that your 30 days is up kind of routine
 
M

Mark Rae

not if i also used an application variable..?

Not quite so bad, but the same principal...

Also, you have no guarantee that there won't ever be an entire day when
no-one visits your site...
 
M

Mark Rae

yes, I don;t have access to these things.. is the problem...

it is a send a reminder email that your 30 days is up kind of routine

How do you know when someone's 30 days are up...?

You must know somehow, right...?
 
J

JP.Gantlin

well part of the once-a-day routine would be took look it up in the database
and see who is due for an email
 
M

Mark Rae

well part of the once-a-day routine would be took look it up in the
database and see who is due for an email

Right - this would be the mythical database that you "don't have access
to"...?
 
J

JP.Gantlin

Where are you getting your mythical information?
You talk like i'm making this up.

I'll bet that attitude is like wearing cement pants at the waterski park for
you in your daily life. a big drag for everyone.

i have a database that i have to check each day so I can know who to send
emails to.
what is so hard about that?
Next, what is so hard about sticking to the question rather than injecting
meta-skepticism.

Doing better on either one of these items would be good for me, and would be
good training for you.
 
M

Mark Rae

Where are you getting your mythical information?

From you...
i have a database that i have to check each day

So, when I asked you if you had a back end database (OK, I said SQL
Server...), why did you reply:
"I don;t have access to these things.. is the problem..."
Next, what is so hard about sticking to the question rather than injecting
meta-skepticism.

Tell you what - next time someone asks you a question because he's trying to
help you, why don't you answer it properly...?
 
J

JP.Gantlin

It's an Access database and I don't have access to a sql server to run jobs
or run the windows scheduler as was suggested.

We all have access to the database from a programmming point of view, what
the hell else would I be doing?
Every one of us has access to a database. What the heck else would we be
doing with***ASP.NET**? honest to pete.

You think I'm just making this up? everyone else got it
You didn't, and at the same time you re-cast your misconceptions into
suspicions.
that's just idiotic, i'll bet you are a pain to work with.

A moment in the life:
Gee i don't see how that could be a stop sign. The traffic department must
be messing with me.
 
M

Mark Rae

It's an Access database
We all have access to the database from a programmming point of view

If you'd said that in the first place, we wouldn't be having this
conversation, as I already have a tried and tested solution for doing
precisely what you require when a Jet database is used as the RDBMS in an
ASP.NET solution.

Good luck.

<plonk>
 

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,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top