Jump to content


Photo

timed script


  • Please log in to reply
5 replies to this topic

#1 desithugg

desithugg
  • Members
  • PipPipPip
  • Advanced Member
  • 281 posts
  • LocationScarborough

Posted 03 August 2006 - 05:00 PM

umm is there anyway i can get some Integer rows in mysql to reset (set back to 0) whenever a new day starts?

#2 Orio

Orio
  • Staff Alumni
  • Advanced Member
  • 2,491 posts

Posted 03 August 2006 - 05:06 PM

You need to do a cron job for that.
You basicly make the script the resets the number, and use a cron to run it every day :)

Orio.
Think you're smarty?

(Gone until 20 to November)

#3 desithugg

desithugg
  • Members
  • PipPipPip
  • Advanced Member
  • 281 posts
  • LocationScarborough

Posted 03 August 2006 - 05:09 PM

any sujjestion where to start?

#4 Orio

Orio
  • Staff Alumni
  • Advanced Member
  • 2,491 posts

Posted 03 August 2006 - 05:11 PM

First, check if your host supports cron jobs.
If it does, make the script and then set a cron job (do you have cpanel, Plesk or something like that?).
If your host doesn't support cron jobs, you basicly cant do it.

Orio.
Think you're smarty?

(Gone until 20 to November)

#5 desithugg

desithugg
  • Members
  • PipPipPip
  • Advanced Member
  • 281 posts
  • LocationScarborough

Posted 03 August 2006 - 05:23 PM

umm i contacted my host and yes they do support cron jobs.I have made the scriot but what do i name the file.

00 00 * * * /aff/reset.php



#6 desithugg

desithugg
  • Members
  • PipPipPip
  • Advanced Member
  • 281 posts
  • LocationScarborough

Posted 03 August 2006 - 05:38 PM

umm i uploaded my file as cron.txt but how can i install it




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users