|Cron Job php help plz|
I know there are many discussions about this same topic and I have gone through as many of them as I could while trying out the different suggestions... all haven't worked. I will supply as much information as I know.
First of all, all I want to know is what to type into the field that says "Cron Job" on my cron manager page for cron jobs and next to it are fields labeled "month", "weeks", "days", "hours", "minutes". I believe setting those all to 0 should be setting frequency to every minute? My host is <snip> (i beleive the php used on it is Apoch 2.0 and a linux server).
All I want to do is test the cron job utility to see it work. I made a text file called "cront.txt" with a zero digit in it. Then I made a php page called "cront.php" that when loaded increases the value in "cront.txt" by one. here is my script for php page:
$file = fopen("cront.txt", "r");
$content = fread($file, filesize("cront.txt"));
$fill = fopen("cront.txt", "w");
After I click "add" it displays a table with columns labeled "Cron Job, Script, (and then the frequency signature)" under Cron Job it shows whatever I typed in the "Cron Job" input field(exactly as i typed it), and under script it shows nothing.
All I wanted to do was test out cron jobs with my Cront files but when i look into the file of "cront.txt" it stays 0 which means the code isn't being run at those intervals supposedly.
Can someone please tell me what in the blazes i type into that field?
PS. my cront files are both in the head directory (or watever directory the index.html file is in)
[edited by: dreamcatcher at 7:36 am (utc) on Oct. 9, 2008]
[edit reason] No urls please! [/edit]
Setting them all to 0 will mean that your cron won't ever get executed. Set them all to * to get it to run every minute. To run it at midnight every day, use 0 0 * * *. To run it at 10 every day, use 10 0 * * * &c. You can execute your PHP scripts from the cron tab using the curl command.
Well here are the options for each drop down menu:
There is also the "Cron Job" field before those, and yes I don't understand why "Months" only goes to 10. I also don't understand why some of the fields have a zero and some don't.