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!
How do I execute PHP scripts on my server? What are all the possible ways of doing this? I know that when some one request a php file on my server that it is run. But how do run a php file without the a request from a remote location?
What I would like to do is have a schedule when a file is to be run.
At allows fairly complex time specifications, extending the POSIX.2 standard. It accepts times of the form HH:MM to run a job at a
specific time of day. (If that time is already past, the next day is assumed.) You may also specify midnight, noon, or teatime (4pm)
and you can have a time-of-day suffixed with AM or PM for running in the morning or the evening. You can also say what day the job
will be run, by giving a date in the form month-name day with an optional year, or giving a date of the form MMDDYY or MM/DD/YY or
DD.MM.YY. The specification of a date must follow the specification of the time of day. You can also give times like now + count
time-units, where the time-units can be minutes, hours, days, or weeks and you can tell at to run the job today by suffixing the time
with today and to run the job tomorrow by suffixing the time with tomorrow.
man crontab
crond is responsible for scanning the crontab files and running their commands at the appropriate time. The crontab program communi-
cates with crond through the "cron.update" file which resides in crontabs directory, usually /var/spool/cron/crontabs. This is accom-
plished by appending the filename of the modified or deleted crontab file to "cron.update" which crond then picks up to resynchronize
or remove its internal representation of the file.
There are 10 types of people in this world, those who understand binary and those who don't
I googled Cron and got a bunch of pages I don't understand about it. I'm finding myself not knowing much about servers when that's the guts of a website.
Where's the best place to learn everything there is to know about web servers explained in simple English terms, still explaining server terminology, and how to administrate them?
<?php
while (true)
{
// some actions here
sleep(10); // sleep for 10 seconds
}
?>
Then you call the main.php from your browser and close it. The child.php is being executed forever ... I am not sure whether you need to set the maximum execution time of child.php by using http://www.php.net/set_time_limit with zero argument value .
There are 10 types of people in this world, those who understand binary and those who don't