[PHP] cron via cPanel (revisited)
Hi gang: Well my host responded with a very helpful reply to my request for help, he said: -- quote -- Ok corn jobs is working on server. But my host says there is something wrong with the script. -Have a great day -- un-quote -- Now, it should be clear to everyone what the problem was -- I thought is was a cron job, and it turns out to be a corn job -- I don't even want to go there. In any event, my cPanel calls for three things: 1. An email address of where to send the error messages. 2. The command line you want the cron to execute. 3. And, the times you want the cron to run. Now, with 1 and 3, I got the idea. But, with 2 -- I can't get it to work. I've tried: /usr/local/bin/php /home/tedd/public_html/my_email.php curl -N http://www.xn--ovg.com/my_email.php but, neither work. Any ideas? Thanks. tedd ps: The above my_email.php does not exist -- I use another php app that sends me an email. I just didn't want to make it public so that I might receive 50K emails from this post. -- http://sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] cron via cPanel
Hi gang: In cPanel one can schedule cron jobs. In the command line box, what command do you enter to run a php script? Thanks. tedd -- http://sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] cron via cPanel
tedd wrote: Hi gang: In cPanel one can schedule cron jobs. In the command line box, what command do you enter to run a php script? Same way you run any other app. If it's in your path, you can just type the filename of the app, if not, give it the path... phpscript.php /path/to/phpscript.php -- John C. Nichel IV Programmer/System Admin (ÜberGeek) Dot Com Holdings of Buffalo 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] cron via cPanel
tedd wrote: In cPanel one can schedule cron jobs. In the command line box, what command do you enter to run a php script? John answered: Same way you run any other app. If it's in your path, you can just type the filename of the app, if not, give it the path... phpscript.php /path/to/phpscript.php John: That was the first thing I tried, namely. email_me.php -- it's just a script that emails me. Then I put in the complete url: http://www.xn--ovg.com/email_me.php Since then (following leads), I've tried these commands: GET http://www.xn--ovg.com/email_me.php php -f -q /home/tedd/public_html/email_me.php # /usr/bin/php -q /home/tedd/public_html/email_me.php /usr/bin/php -q /home/tedd/public_html/email_me.php /usr/lib/php:/usr/local/lib/php -q /home/tedd/public_html/email_me.php /usr/local/lib/php -q /home/tedd/public_html/email_me.php /usr/local/lib/php -q -f /home/tedd/public_html/email_me.php and a couple of dozen others with a cron job to be run every minute -- and nothing has worked. I've been at this since late yesterday until 3:00 am and from 7:00 am to now. I have read scores of posts, articles, searched a dozen of php books, and couple of manuals and I can't get any suggestion/examples to work. If nothing else, at least I'm persistent. I just wish I could be right more often. Thanks for any suggestions. tedd -- http://sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] cron via cPanel
tedd wrote: tedd wrote: In cPanel one can schedule cron jobs. In the command line box, what command do you enter to run a php script? John answered: Same way you run any other app. If it's in your path, you can just type the filename of the app, if not, give it the path... phpscript.php /path/to/phpscript.php John: That was the first thing I tried, namely. email_me.php -- it's just a script that emails me. Then I put in the complete url: http://www.xn--ovg.com/email_me.php Since then (following leads), I've tried these commands: GET http://www.xn--ovg.com/email_me.php php -f -q /home/tedd/public_html/email_me.php # /usr/bin/php -q /home/tedd/public_html/email_me.php /usr/bin/php -q /home/tedd/public_html/email_me.php /usr/lib/php:/usr/local/lib/php -q /home/tedd/public_html/email_me.php /usr/local/lib/php -q /home/tedd/public_html/email_me.php /usr/local/lib/php -q -f /home/tedd/public_html/email_me.php and a couple of dozen others with a cron job to be run every minute -- and nothing has worked. I've been at this since late yesterday until 3:00 am and from 7:00 am to now. I have read scores of posts, articles, searched a dozen of php books, and couple of manuals and I can't get any suggestion/examples to work. If nothing else, at least I'm persistent. I just wish I could be right more often. Thanks for any suggestions. tedd Is the script executable by the user you're trying to run it as? -- By-Tor.com ...it's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php