p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Linux (http://p2p.wrox.com/forumdisplay.php?f=54)
-   -   Cron Job Error - Need Help (http://p2p.wrox.com/showthread.php?t=31933)

jkirkpatrick July 28th, 2005 11:37 AM

Cron Job Error - Need Help

I'm trying to set up my very first cron job.It's a simple little .php script that mails customers who ordered from me 10 days ago. Here is what I have in the cron job manager area of CPanel:

30 11 * * * /home/pipsquea/www/thanx.php

When it ran I was emailed the error:

/bin/sh: line 1: 30: command not found

I have no idea what this means or how to fix it. Is my syntax wrong? If anyone can give me some very basic advice on how to fix this problem I would be grateful.


anshul August 1st, 2005 01:09 PM

Use this for command:

GET http://www.mysite.com/path_to_file/file.php > /dev/null


Ask me time related fields, if you don't understand.


ciderpunx August 5th, 2005 05:51 AM

What is happening is that linux doesn't know how to run a .php file natively.

You need to install the php command line interpreter (CLI) and EITHER

rewrite your cron job as follows:

30 11 * * * php /home/pipsquea/www/thanx.php

OR keep the cron job the same and insert the following at the very top of your .php file:

#!/usr/bin/php -q

There's a tutorial here:


Don't Stand on your head - you'll get footprints in your hair

All times are GMT -4. The time now is 12:34 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.