Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 23rd January 2013, 14:29
Hoox Hoox is offline
Junior Member
 
Join Date: Oct 2010
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Cron job not working

I need to setup a cron job from a php file. This is the line I need to run (from documentation): php /var/www/clients/client3/web24/web/cron.php >/dev/null 2>&1

I have set Client limit to chrooted cron in ISPConfig.

I tried manually editing the cron file to /usr/bin/php /var/www/clients/client3/web24/web/cron.php >/dev/null 2>&1.
Also tried with both full path and /web/cron.php >/dev/null 2>&1.
Reply With Quote
Sponsored Links
  #2  
Old 23rd January 2013, 15:27
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,983
Thanks: 825
Thanked 5,372 Times in 4,219 Posts
 
Default

First, a cronjob (does not matter if you use ispconfig) has always to contain full paths, so it always have to start with "/usr/bin/php", so you have to enter in ISPConfig:

/usr/bin/php /var/www/clients/client3/web24/web/cron.php

To use the php binary (which is outside of the web root), you have to ensure that you create it as full cron and not jailed cron.

But my recommendation is something else, as the cron.php file is in the web directory, the easiest and secure way to set this up is a url cron. For a url cron, you just put the url to this script in the cron command line in ispconfig. e.g.:

http://www.yourdomomain.tld/cron.php

and ispconfig will create a cronjon that calls this url.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
problem in using : perfect-server-ubuntu-12.10-apache2-bind-dovecot-ispconfig-3, rezabagheri Installation/Configuration 7 30th October 2012 22:55
Cron Job php with '.....' in the ending Imam86 Installation/Configuration 1 24th September 2012 02:36
Cron job has stopped working erkan Installation/Configuration 9 21st August 2012 13:57
Cron Job not working asn General 4 13th September 2011 12:54
Problem getting cron job to run and in need of help :) MrCompTech General 7 27th July 2010 09:50


All times are GMT +2. The time now is 09:51.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.