[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:
parent
928385c00c
commit
43fa4358c2
@ -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');
|
||||
|
||||
|
||||
@ -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');
|
||||
|
||||
|
||||
@ -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');
|
||||
|
||||
|
||||
@ -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');
|
||||
|
||||
|
||||
@ -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');
|
||||
|
||||
|
||||
@ -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');
|
||||
|
||||
|
||||
@ -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');
|
||||
|
||||
|
||||
@ -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');
|
||||
|
||||
|
||||
@ -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');
|
||||
|
||||
|
||||
@ -63,7 +63,7 @@ fi
|
||||
# Find scripts path
|
||||
if [[ -L $0 ]]; then
|
||||
CRONHOME=$( dirname $( readlink $0 ) )
|
||||
else
|
||||
else
|
||||
CRONHOME=$( dirname $0 )
|
||||
fi
|
||||
|
||||
|
||||
@ -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');
|
||||
|
||||
|
||||
@ -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');
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user