On TIME Process

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
victhour
Forum Commoner
Posts: 38
Joined: Fri Feb 17, 2006 12:59 am
Contact:

On TIME Process

Post by victhour »

i have a small project("CMS") that supposed to generate some html's pages.

now my question, how would i authomatically generate those page's base on TIME?

like if it reach'ez to 12 hours it will then execute some script to generates thos pages.

help please...

thanx in advanced.
SKDevelopment
Forum Newbie
Posts: 13
Joined: Thu Jan 26, 2006 10:42 am

Post by SKDevelopment »

If you have a scrpit which generates those pages, you could use Cron, to run this script at some particular time (or over a time interval). To do this you have to edit the crontab file at you server.

If you type "crontab" or "crontab file format" in Google, you'll get a lot of information how to set a Cron job. E.g.

http://en.wikipedia.org/wiki/Crontab
http://www.adminschoice.com/docs/crontab.htm
http://www.opengroup.org/onlinepubs/007908799/xcu/crontab.html

--
Best Regards,
Sergey Korolev
www.SKDevelopment.com
victhour
Forum Commoner
Posts: 38
Joined: Fri Feb 17, 2006 12:59 am
Contact:

Post by victhour »

yeah, i heard about this "cron job" thing but, what i want is the idea behind authomating things according to time that would trigger some scripts to execute.

tanx for your attention... hope to here more.

regardz!
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

psst, that's what cron is for.
victhour
Forum Commoner
Posts: 38
Joined: Fri Feb 17, 2006 12:59 am
Contact:

Post by victhour »

hehe...

im a bit confused. can anyone show me how to set "cron job" like how to include and cexecute my script on a cron file
every 11PM from Monday-Sunday.

tanx again.
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Post by josh »

step 1. go to google
step 2. type in set up cron job
step 3. find a good site and follow the instructions there
step 4. put php /path/to/script.php for the script
Post Reply