diff --git a/cronjobs/run-crons.sh b/cronjobs/run-crons.sh index e797cb44..ab1f482c 100755 --- a/cronjobs/run-crons.sh +++ b/cronjobs/run-crons.sh @@ -12,9 +12,6 @@ PHP_BIN=$( which php ) # Path to PID file, needs to be writable by user running this PIDFILE='/tmp/mmcfe-ng-cron.pid' -# Location of our cronjobs, assume current directory -CRONHOME='.' - # List of cruns to execute CRONS="findblock.php proportional_payout.php pplns_payout.php pps_payout.php blockupdate.php auto_payout.php tickerupdate.php notifications.php statistics.php archive_cleanup.php" @@ -30,6 +27,9 @@ VERBOSE="0" # # ################################################################ +# Find scripts path +CRONHOME=$( dirname $0 ) + # Change working director to CRONHOME if ! cd $CRONHOME 2>/dev/null; then echo "Unable to change to working directory \$CRONHOME: $CRONHOME"