Cron Help
I don't understand the concept of cron. I thought it would run a file at intervals I choose, but when I run a file that is supposed to add an entry to my mysql database, it gives me this error:
/home/blabla/public_html/blabla/idupdater.php: line 1: ?php: No such file or directory
/home/blabla/public_html/blabla/idupdater.php: line 3: syntax error near unexpected token `"config.php"'
/home/blabla/public_html/blabla/idupdater.php: line 3: `include_once("config.php");'
Anyone know what I'm doing? I sure don't.
Abhishek Reddy posted this at 07:19 — 15th December 2004.
He has: 3,348 posts
Joined: Jul 2001
What's the code in your script?
Busy posted this at 11:02 — 15th December 2004.
He has: 6,151 posts
Joined: May 2001
is your config.php file in the same as the cron file? if not put the path to the config in the include
grinchy posted this at 20:03 — 15th December 2004.
They have: 12 posts
Joined: Dec 2004
Are you sure you have the right header in your file
eg
#! /usr/bin/php -q
airoid3000 posted this at 02:41 — 16th December 2004.
They have: 71 posts
Joined: Mar 2004
Thanks grinchy!!! I had a typo in the header.
grinchy posted this at 13:27 — 16th December 2004.
They have: 12 posts
Joined: Dec 2004
glad to help
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.