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
SirChick
Forum Contributor
Posts: 125 Joined: Tue Jul 31, 2007 11:55 am
Post
by SirChick » Tue Aug 21, 2007 7:38 am
What feature in php can i use to increment a number field in my user table by say like 5 every 10 minutes but once it reaches the same as another field such as "max" itll stop incrementing?
I've not done code which runs upon time, only upon user actions... is there such a feature ?
VladSun
DevNet Master
Posts: 4313 Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria
Post
by VladSun » Tue Aug 21, 2007 7:54 am
Search for crontab. But I can't tell you whteher it is available on your server or not - it depends on your hosting provider.
There are 10 types of people in this world, those who understand binary and those who don't
SirChick
Forum Contributor
Posts: 125 Joined: Tue Jul 31, 2007 11:55 am
Post
by SirChick » Tue Aug 21, 2007 8:01 am
well im using local host xampp package which is apache at the moment :/
can't i make crons work off my computer time temporarily until i buy a real server?
VladSun
DevNet Master
Posts: 4313 Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria
Post
by VladSun » Tue Aug 21, 2007 8:04 am
XAMPP for Windows or for Linux?
There are 10 types of people in this world, those who understand binary and those who don't
SirChick
Forum Contributor
Posts: 125 Joined: Tue Jul 31, 2007 11:55 am
Post
by SirChick » Tue Aug 21, 2007 8:15 am
windows
VladSun
DevNet Master
Posts: 4313 Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria
Post
by VladSun » Tue Aug 21, 2007 8:20 am
http://drupal.org/node/31506
You need to call php like this:
If you have problems try using full path to php and file_to_run.php.
There are 10 types of people in this world, those who understand binary and those who don't
SirChick
Forum Contributor
Posts: 125 Joined: Tue Jul 31, 2007 11:55 am
Post
by SirChick » Tue Aug 21, 2007 8:35 am
hmm that link guide seems to be about an older version im using vista which is different there is no
# Double-click Add Scheduled Task
# The Scheduled Task Wizard will appear. Click Next.
And creating a task theres no option of picking a browser
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Tue Aug 21, 2007 8:40 am
You wouldn't use a browser. It's a command line call.
icron may of interest too. I don't know if it's compatible with Vista however.