about cron , is it possible to run it in php ?

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
ScOrPi
Forum Commoner
Posts: 44
Joined: Fri Jul 09, 2010 8:01 am
Location: BAGHDAD - IRAQ

about cron , is it possible to run it in php ?

Post by ScOrPi »

Hi All,
how are you ?
I've question about CRON ! .. is there any possible to make cron from php itself ? without change anything in Linux ?
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: about cron , is it possible to run it in php ?

Post by social_experiment »

“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Eric!
DevNet Resident
Posts: 1146
Joined: Sun Jun 14, 2009 3:13 pm

Re: about cron , is it possible to run it in php ?

Post by Eric! »

Just an FYI -- you can't setup a cron job without changing anything in linux. The above tool needs permission with exec or shell_exec to work and it runs crontab in the shell to schedule the job. If your question is about making a script that can schedule itself to run, no it can't be done. You have to use crontab (or a tool that runs crontab) to schedule the server to run your script.
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: about cron , is it possible to run it in php ?

Post by social_experiment »

Eric! wrote:Just an FYI -- you can't setup a cron job without changing anything in linux.
Yeah that's what i thought but i wasn't completely sure about it
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
ScOrPi
Forum Commoner
Posts: 44
Joined: Fri Jul 09, 2010 8:01 am
Location: BAGHDAD - IRAQ

Re: about cron , is it possible to run it in php ?

Post by ScOrPi »

Thanks guys ..

I'm now little disappoint ... thank you Eric! about your information ..

i really wish that php would support timers... :(
Post Reply