parent
bbcb210f27
commit
450cc4d24d
@ -15,9 +15,6 @@ PIDFILE='/tmp/mmcfe-ng-cron.pid'
|
|||||||
# List of cruns to execute
|
# 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"
|
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"
|
||||||
|
|
||||||
# Additional arguments to pass to cronjobs
|
|
||||||
CRONARGS="-v"
|
|
||||||
|
|
||||||
# Output additional runtime information
|
# Output additional runtime information
|
||||||
VERBOSE="0"
|
VERBOSE="0"
|
||||||
|
|
||||||
@ -27,6 +24,20 @@ VERBOSE="0"
|
|||||||
# #
|
# #
|
||||||
################################################################
|
################################################################
|
||||||
|
|
||||||
|
# Overwrite some settings via command line arguments
|
||||||
|
while getopts "hvp:" opt; do
|
||||||
|
case "$opt" in
|
||||||
|
h|\?)
|
||||||
|
echo "Usage: $0 [-v] [-p PHP_BINARY]";
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
v) VERBOSE=1
|
||||||
|
;;
|
||||||
|
p) PHP_BIN=$3; shift;
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
# Find scripts path
|
# Find scripts path
|
||||||
if [[ -L $0 ]]; then
|
if [[ -L $0 ]]; then
|
||||||
CRONHOME=$( dirname $( readlink $0 ) )
|
CRONHOME=$( dirname $( readlink $0 ) )
|
||||||
@ -70,8 +81,8 @@ fi
|
|||||||
echo $PID > $PIDFILE
|
echo $PID > $PIDFILE
|
||||||
|
|
||||||
for cron in $CRONS; do
|
for cron in $CRONS; do
|
||||||
[[ $VERBOSE == 1 ]] && echo "Running $cron, see output below for details"
|
[[ $VERBOSE == 1 ]] && echo "Running $cron, check logfile for details"
|
||||||
$PHP_BIN $cron $CRONARGS
|
$PHP_BIN $cron
|
||||||
done
|
done
|
||||||
|
|
||||||
# Remove pidfile
|
# Remove pidfile
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user