Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
May 16, 2012, 07:32:10 PM

Pages: [1]   Go Down
  Print  
Author Topic: setting up cron job  (Read 619 times)
CK
Intergalactic Cowboy
*****
Offline Offline

Posts: 58


« on: July 06, 2004, 07:01:16 PM »

This is my first cron job.  I am trying to set it up using the cPanel Cron Jobs Standard interface.

What do I do?

put in the path to the php file and set my times?  What should be the format of the command?
Logged
CK
Intergalactic Cowboy
*****
Offline Offline

Posts: 58


« Reply #1 on: July 26, 2004, 05:24:12 PM »

Using the basic I set everything up with the help of LP Support, but I am getting this error:


Code:

/bin/sh: line 1: /home/~user/public_html/script.php: Permission denied


Line one is this:

Code:
<?php


So there is definitely something wrong.

Any pointers?

FYI, here is how I set up the cron job with LP's guidance:
Quote


In Cpanel under Cron Jobs, choose Standard. If you want output or errors
emailed to you, enter an email address in the email box. Set the days and
times by clicking in the boxes to select from the menus. In the "Command to
run:" box, put the full home path to the script:
/home/~username/public_html/script.php

(Replace username with your username)

If the script works when you run it directly but you get error messages with
cron, please paste the exact error message in a post it in the PHP forum at
http://lunarforums.com
Logged
jojooboo
Jabba the Hutt
*****
Offline Offline

Posts: 717



WWW
« Reply #2 on: July 26, 2004, 07:44:13 PM »

Set your cron job to:

Code:

php /home/user/public_html/script.php


or
Code:

lynx -dump http://www.domain.com/script.php
Logged

CK
Intergalactic Cowboy
*****
Offline Offline

Posts: 58


« Reply #3 on: July 27, 2004, 12:02:22 AM »

Quote from: jojooboo
Set your cron job to:

Code:

php /home/user/public_html/script.php



Now I am getting the following:

Content-type: text/html
X-Powered-By: PHP/4.3.8

Does that mean everything is cool runnings?

If so thanks a lot J!!
Logged
JimBrown
Knowing enough to be dangerous!
Jabba the Hutt
*****
Offline Offline

Posts: 743



WWW
« Reply #4 on: July 27, 2004, 11:45:31 AM »

CK,

Quote

Does that mean everything is cool runnings?


Yep. Or, at least it is running your PHP script.

If you'd like more info from the script, you can "echo" whatever you want, and it will appear below the two lines you showed above.

Also, any PHP errors will show up.

...jim
Logged

Pages: [1]   Go Up
  Print  
 
Jump to: