Page 1 of 1

Execute phpcode/script in set intervals

Posted: Sat Jun 04, 2005 4:36 am
by MasterKalas
Is there a built in function in php that allows me to set an interval in which a php-codesegment or script will execute/run?

Posted: Sat Jun 04, 2005 6:45 am
by hawleyjr
Why not just use a cron job?

Re: Execute phpcode/script in set intervals

Posted: Sat Jun 04, 2005 9:10 am
by Roja
MasterKalas wrote:Is there a built in function in php that allows me to set an interval in which a php-codesegment or script will execute/run?
Not really. You'd need to run a cronjob.

Posted: Sun Jun 05, 2005 5:57 am
by MasterKalas
And what is a cronjob ?

Posted: Sun Jun 05, 2005 6:11 am
by Bennettman
A command in Unix/Linux that lets you schedule tasks. Windows has a similar feature. Some hosters (I know cPanel has this feature) let you handle cron jobs to execute PHP files, send e-mail etc.

Posted: Mon Jun 06, 2005 9:50 am
by MasterKalas
So I need to contact my webhost if it is possible to execute cronjobs on their server, am I right ?

Posted: Mon Jun 06, 2005 11:19 am
by Skara
Most web hosts have a control panel of some sort which allows you to execute cron jobs. I'd check the nooks and crannys there first.

Posted: Mon Jun 06, 2005 12:01 pm
by John Cartwright
Do you use CPanel?

Posted: Tue Jun 07, 2005 4:03 am
by MasterKalas
I dont even know what CPanel is =)

Posted: Tue Jun 07, 2005 8:37 am
by Bennettman
Okay, if you have hosting from a provider, they'll typically give you access to a control panel of some sort (for cPanel, it's usually accessed from http://www.yourdomain.com/cpanel/), showing how much space you've used, statistics, access to phpMyAdmin, file manager, email address etc. They usually mention it in the welcoming email. That control panel sometimes has the cron options as well.

Posted: Tue Jun 07, 2005 8:48 am
by MasterKalas
I have a controlpanel to use but i checked and couldnt find anything about doing a conrjob, emailed their support to be sure. But if they dont have that option is there any other way to do/execute a cronjob ?