Important Notice:
Two sections of this forum are available only to registered customers. In order to receive access to the Customer Forums and ResellerCentral Forums, you must first register on these forums or login to your existing forum account. If you are an existing HostNine customer, be sure to register using the email address on file for your billing profile.
|
|||||||
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Guys
I have set a cron up and it does not seem to work. i get this message when it si run Quote:
Quote:
Regards Mark |
|
#2
|
|||
|
|||
|
Quote:
You are asking bash to execute PHP. Usually you run PHP this way from cron... * * * * * php -q /home/lazyshee/public_html/uptime/check2min.php sometimes... * * * * * wget http://www.lazysheepmedia.com/uptime/check5min.php Remember to set... MAILTO="" ... to where any output is mailed to or add... >/dev/null 2>&1 ... to the end of the script to suppress any output. |
|
#3
|
|||
|
|||
|
A few years ago I wrote a couple of shell scripts that monitor uptime and load average. The load average one emails you, with the current uptime and a ps list, if the load average gets above a certain level and the uptime one saves the uptime to a text file on the server. If there was a reboot since last check, it saves a line with the reboot time and the total uptime of last boot, also.
PM me if you want me to email them to you. I run them every 15 minutes. They have little impact on the server. Sample uptime... Server rebooted: [ Wed Sep 5 01:51:02 PDT 2007 ] Last uptime: .65 days 06:07:01 up 42 days, 4:16, 2 users, load average: 0.52, 0.48, 0.59 [ Wed Oct 17 06:07:02 PDT 2007 ] Server rebooted: [ Wed Oct 17 11:21:04 PDT 2007 ] Last uptime: 42.39 days 12:07:01 up 9 days, 19:55, 2 users, load average: 0.12, 0.34, 0.24 [ Sat Oct 27 12:07:02 PDT 2007 ] Server rebooted: [ Sat Oct 27 16:53:02 PDT 2007 ] Last uptime: 10.02 days 00:07:02 up 29 days, 8:15, 0 users, load average: 4.20, 2.89, 2.29 [ Mon Nov 26 00:07:06 PST 2007 ] Server rebooted: [ Mon Nov 26 00:24:04 PST 2007 ] Last uptime: 29.35 days 12:07:01 up 18 days, 11:43, 0 users, load average: 0.35, 1.04, 1.41 [ Fri Dec 14 12:07:03 PST 2007 ] Last edited by jimbug; 12-14-2007 at 03:58 PM. |
|
#4
|
|||
|
|||
|
Hi Jim
I have tried both and it returns the same error in ssh Quote:
Thanks Mark |
|
#5
|
|||
|
|||
|
Hi Mark,
I know nothing about your server or the PHP script you're running. Apparently it's executing some shell commands. I try to run only shell scripts from cron. I think shell scripts have a lower impact on the server. I would suggest you debug the PHP script before running it with cron. And maybe rewrite it as a shell script. I don't know much more to say. |
|
#6
|
|||
|
|||
|
Thanks Jim
I think it is back to the drawing board to fix it Thanks for your time Kind regards Mark |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| node42 Cron | BlueOx | Reseller Hosting | 6 | 07-07-2008 03:37 PM |
| Suspension Due to corn jobs!!! | eindia7 | Reseller Hosting | 2 | 04-17-2008 10:55 AM |






Linear Mode

