| Author |
Topic Search Topic Options
|
asp what that??
Mod Builder Group
Joined: 08 November 2003
Location: United States
Status: Offline
Points: 140
|
Post Options
Thanks(0)
Quote Reply
Posted: 28 September 2004 at 1:35pm |
|
what i needed to do was give everyone in the db (X) about of credits per/ so many mins... so what i am gonna do is on the home page when they log in...i will do a date/time stamp and add it to the db and then add a include file on every page that checks the time and updates the db with a new time ever (X) about of mins and then i will use that to add the credits... unless there is a better way LOL...im all ears ;)
|
 |
ljamal
Mod Builder Group
Joined: 16 April 2003
Status: Offline
Points: 888
|
Post Options
Thanks(0)
Quote Reply
Posted: 28 September 2004 at 2:35pm |
|
are you using Access or SQL Server?
SQL Server has a scheduler
|
|
|
 |
asp what that??
Mod Builder Group
Joined: 08 November 2003
Location: United States
Status: Offline
Points: 140
|
Post Options
Thanks(0)
Quote Reply
Posted: 28 September 2004 at 2:57pm |
access...i have never used sql server
|
 |
asp what that??
Mod Builder Group
Joined: 08 November 2003
Location: United States
Status: Offline
Points: 140
|
Post Options
Thanks(0)
Quote Reply
Posted: 30 September 2004 at 7:04pm |
bump*
i am not sure if this is gonna work...do you have any other ideas??
|
 |
Gullanian
Senior Member
Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
|
Post Options
Thanks(0)
Quote Reply
Posted: 30 September 2004 at 7:44pm |
|
Well, you only need to update credits everytime someone comes on the
site. This isn't probably very efficient, but it'll work for a
small number of users.
In your users table, have 3 fields for each user:
- Sign up date
- Credits
- Credit_accounted_for
Every page view the user does, calculate how many credits they should
have. If this is different than credit_accounted_for, then add
the difference to credits field, and set credit_accounted_for to the
new value.
|
 |
dpyers
Senior Member
Joined: 12 May 2003
Status: Offline
Points: 3937
|
Post Options
Thanks(0)
Quote Reply
Posted: 30 September 2004 at 7:54pm |
Tou can use Session_OnStart sub in global.asa to check if it's time to run a script. The advantage is that it doesn't check for the time eerytime the home page is visited, but everytime someone visits the site. For some time periods though, you may have no one starting sessions.
If the script absolutely has to run at specified times, the best way is to either go with a host who has some in-house scheduling component, or drop a couple of bucks a month on a unix account with crontab capability. You can use cron to run the Lynx text browser on unix that runs an asp script on your windows account.
There was discussion about something similar in this thread - http://forums.webwiz.net/forum_posts.asp?TID=89 23&PN=0&TPN=2
|
Lead me not into temptation... I know the short cut, follow me.
|
 |
asp what that??
Mod Builder Group
Joined: 08 November 2003
Location: United States
Status: Offline
Points: 140
|
Post Options
Thanks(0)
Quote Reply
Posted: 30 September 2004 at 9:40pm |
|
what i did was added 2 columns to the db...on that is the julian date and the other is the hour of the last update. then i take and compair todays julian date and the hour...and i can use that do update the credits per user...i added a include file on all my pages so that it always does the check...
|
 |
asp what that??
Mod Builder Group
Joined: 08 November 2003
Location: United States
Status: Offline
Points: 140
|
Post Options
Thanks(0)
Quote Reply
Posted: 05 February 2009 at 9:10pm |
|
hey guys its been a while but I'm back!
|
|
|
 |