[IMPROVED] Allow running crons with full path

Crons can now be called from any directory and will be executed inside
their working directory. Allows for more flexibility, e.g. taking out
the statistics cron and running it directly.
This commit is contained in:
Sebastian Grewe 2013-09-30 09:46:34 +02:00
parent 928385c00c
commit 43fa4358c2
12 changed files with 34 additions and 1 deletions

View File

@ -19,6 +19,9 @@ limitations under the License.
*/
// Change to working directory
chdir(dirname(__FILE__));
// Include all settings and classes
require_once('shared.inc.php');

View File

@ -19,6 +19,9 @@ limitations under the License.
*/
// Change to working directory
chdir(dirname(__FILE__));
// Include all settings and classes
require_once('shared.inc.php');

View File

@ -19,6 +19,9 @@ limitations under the License.
*/
// Change to working directory
chdir(dirname(__FILE__));
// Include all settings and classes
require_once('shared.inc.php');

View File

@ -19,6 +19,9 @@ limitations under the License.
*/
// Change to working directory
chdir(dirname(__FILE__));
// Include all settings and classes
require_once('shared.inc.php');

View File

@ -19,6 +19,9 @@ limitations under the License.
*/
// Change to working directory
chdir(dirname(__FILE__));
// Include all settings and classes
require_once('shared.inc.php');

View File

@ -19,6 +19,9 @@ limitations under the License.
*/
// Change to working directory
chdir(dirname(__FILE__));
// Include all settings and classes
require_once('shared.inc.php');

View File

@ -19,6 +19,9 @@ limitations under the License.
*/
// Change to working directory
chdir(dirname(__FILE__));
// Include all settings and classes
require_once('shared.inc.php');

View File

@ -19,6 +19,9 @@ limitations under the License.
*/
// Change to working directory
chdir(dirname(__FILE__));
// Include all settings and classes
require_once('shared.inc.php');

View File

@ -19,6 +19,9 @@ limitations under the License.
*/
// Change to working directory
chdir(dirname(__FILE__));
// Include all settings and classes
require_once('shared.inc.php');

View File

@ -63,7 +63,7 @@ fi
# Find scripts path
if [[ -L $0 ]]; then
CRONHOME=$( dirname $( readlink $0 ) )
else
else
CRONHOME=$( dirname $0 )
fi

View File

@ -19,6 +19,9 @@ limitations under the License.
*/
// Change to working directory
chdir(dirname(__FILE__));
// Include all settings and classes
require_once('shared.inc.php');

View File

@ -19,6 +19,9 @@ limitations under the License.
*/
// Change to working directory
chdir(dirname(__FILE__));
// Include all settings and classes
require_once('shared.inc.php');