hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : Run PHP with Crontab - Help!
Reply

Forum Jump

Run PHP with Crontab - Help!

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old
Newbie
 
Join Date: Jan 2005
Posts: 12

Run PHP with Crontab - Help!


Hey all,

I'm having some major problems trying to run a PHP script with crontab. The script is located at www.myserver.com/crontest.php. I have tried multiple crontabs and none have worked. Right now it looks like this:

wget http://www.myserver.com/crontest.php

When that command is entered and I ask crontab to send out an email to be with the results, I recieve this error in my email:

/bin/sh: line 1: /usr/bin/wget: Permission denied

I have also tried other methods, to no avail. I am using hostingzoom hosting, so I'm not sure if I need to do something with paths, or if they need to set something up. Also, I have run chmod 755 on the file crontest.php so it should be executable.

What else to I need to do to get this script to run regularly? I have heard that I need to put some kind of line at the beginning of the crontest.php script, and also that I may need to modify the command. Any ideas? Thanks much!

__________________
Custom Web Design Services
http://www.pcistudios.com



Sponsored Links
  #2  
Old
Newbie
 
Join Date: Jan 2005
Posts: 12
Update - problem solved thanks to the helpful guys at ResellerZoom. I just needed to enter this cron command:

/usr/bin/php -q /home/my_username/www/crontest.php

__________________
Custom Web Design Services
http://www.pcistudios.com

  #3  
Old
WHT Addict
 
Join Date: May 2001
Posts: 142
The other option would have been to use lynx (command line based web browser)

__________________
Colocation and Dedicated Servers
www.nwcolo.co.uk

Sponsored Links
Reply

Related posts from TheWhir.com
Title Type Date Posted


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
WHT Host Brief Email:

We respect your privacy. We will never sell, rent, or give away your address to any outside party, ever.

Advertisement:
Web Hosting News:
WHT Membership
WHT Membership



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?