Results 1 to 10 of 10
Thread: Help: Cronjob not working?
-
08-24-2009, 03:56 AM #1Junior Guru Wannabe
- Join Date
- Jan 2007
- Posts
- 79
Help: Cronjob not working?
I currently have this cronjob setup:
*/2 * * * * /usr/bin/php /home/admin/domains/vilegaming.com/public_html/test.php
-
08-24-2009, 04:25 AM #2Web Hosting Master
- Join Date
- Apr 2002
- Location
- Auckland - New Zealand
- Posts
- 1,575
Is the test.php chmod 755 or 750?
Alternatively, use /usr/bin/php -q /home/admin/domains/vilegaming.com/public_html/test.php
-
08-24-2009, 04:26 AM #3Temporarily Suspended
- Join Date
- Jul 2009
- Posts
- 178
/usr/local/bin/php /home/admin/domains/vilegaming.com/public_html/test.php
This should work.
-
08-24-2009, 05:18 AM #4Web Hosting Master
- Join Date
- Mar 2009
- Location
- Gods Own Country
- Posts
- 681
..but it doesn't seem to execute the script?
Code:whereis php
█ Fabin Mundattil @ Xieles Support
█ High Quality Server Management | support @ xieles.com
█ https://xieles.com
-
08-24-2009, 06:26 AM #5Disabled
- Join Date
- Apr 2005
- Location
- Cochin
- Posts
- 2,452
can u execute the cron in the commandline ?
Also tail the cron log to confirm that it is not actually running
-
08-24-2009, 12:20 PM #6Aspiring Evangelist
- Join Date
- Sep 2007
- Posts
- 369
First run your script manuallly
php /home/admin/domains/vilegaming.com/public_html/test.php
Also check php path.
Another alternative to check
wget -q -O /dev/null http://vilegaming.com/test.php > /dev/null
Also check cron log.
#tail -f /var/log/cron
-
08-24-2009, 07:01 PM #7Junior Guru Wannabe
- Join Date
- Jan 2007
- Posts
- 79
Tried both, none worked.
Yea, that is the correct path (the "/local/").
Did so and it was in "/usr/local/bin/php". I tried that with the other posters' recommandations and still nothing works.
I tried this, with SSH access..
Code:Last login: Mon Aug 24 03:39:05 from cpe-98-155-40-235.san.res.rr.com [root@server ~]# php /home/admin/domains/vilegaming.com/public_html/test.php Warning: require(system/database.mysql.php): failed to open stream: No such file or directory in /home/admin/domains/vilegaming.com/public_html/system/common.php on line 22 Fatal error: require(): Failed opening required 'system/database.mysql.php' (include_path='.:/usr/local/lib/php') in /home/admin/domains/vilegaming.com/public_html/system/common.php on line 22
Here is what my command looks like in DirectAdmin's interface:
http://i30.tinypic.com/2ep2d52.png
-
08-24-2009, 07:10 PM #8Junior Guru Wannabe
- Join Date
- Jan 2007
- Posts
- 79
Er, wait..
Code:wget -q -O /dev/null http://vilegaming.com/test.php > /dev/null
I'm just curious.. what does the "-O" and the "> /dev/null" do? I know the "-q" tells it to run in quiet mode.
Thanks, nomankhn!
-
08-25-2009, 02:36 PM #9Junior Guru Wannabe
- Join Date
- Jan 2007
- Posts
- 79
I realized that the "> /dev/null" isn't needed for the cron to work, by taking it out.
-
08-25-2009, 03:07 PM #10Aspiring Evangelist
- Join Date
- Sep 2007
- Posts
- 369
Similar Threads
-
how to do this with a cronjob?
By HD Fanatic in forum Hosting Security and TechnologyReplies: 8Last Post: 07-15-2007, 11:08 PM -
SSH Cronjob
By priceww in forum Hosting Security and TechnologyReplies: 8Last Post: 03-02-2007, 12:00 AM -
Help With Cronjob!
By sikkhost in forum Hosting Security and TechnologyReplies: 2Last Post: 09-15-2004, 09:36 AM -
Need CronJob help!!
By WP1 in forum Web HostingReplies: 0Last Post: 03-06-2003, 04:48 PM -
Cronjob! help me...
By FrzzMan in forum Web HostingReplies: 4Last Post: 03-05-2003, 11:57 AM