+ add dailyreminder to cron.
This commit is contained in:
16
bin/init.bat
16
bin/init.bat
@@ -28,6 +28,15 @@ SET backup= %phpcli% %baseDir%php\backup.php
|
||||
echo %backup% > %baseDir%backup.bat
|
||||
echo backup.bat ok
|
||||
|
||||
:: create dailyreminder.bat
|
||||
if %requestType% == 'PATH_INFO' (
|
||||
SET computeburn= %phpcli% %baseDir%ztcli "http://localhost/report-remind"
|
||||
)else (
|
||||
SET computeburn= %phpcli% %baseDir%ztcli "http://localhost/?m=report&f=remind"
|
||||
)
|
||||
echo %computeburn% > %baseDir%dailyreminder.bat
|
||||
echo dailyreminder.bat ok
|
||||
|
||||
:: create computeburn.bat
|
||||
if %requestType% == 'PATH_INFO' (
|
||||
SET computeburn= %phpcli% %baseDir%ztcli "http://localhost/project-computeburn"
|
||||
@@ -64,9 +73,10 @@ echo crond.bat ok
|
||||
if not exist %cronDir% md %cronDir%
|
||||
echo # system cron. > %sysCron%
|
||||
echo #min hour day month week command. >> %sysCron%
|
||||
echo 1 1 * * * %baseDir%backup.bat # backup database and file. >> %sysCron%
|
||||
echo 1 23 * * * %baseDir%computeburn.bat # compute burndown chart. >> %sysCron%
|
||||
echo 1-59/2 * * * * %baseDir%svnrun.bat # sync subversion. >> %sysCron%
|
||||
echo 0 1 * * * %baseDir%dailyreminder.bat # daily reminder. >> %sysCron%
|
||||
echo 1 1 * * * %baseDir%backup.bat # backup database and file. >> %sysCron%
|
||||
echo 1 23 * * * %baseDir%computeburn.bat # compute burndown chart. >> %sysCron%
|
||||
echo 1-59/2 * * * * %baseDir%svnrun.bat # sync subversion. >> %sysCron%
|
||||
|
||||
:: return 0 when success.
|
||||
exit /b 0
|
||||
|
||||
10
bin/init.sh
10
bin/init.sh
@@ -38,6 +38,15 @@ fi
|
||||
echo $computeburn > $basePath/computeburn.sh
|
||||
echo "computeburn.sh ok"
|
||||
|
||||
# daily remind
|
||||
if [ $requestType == 'PATH_INFO' ]; then
|
||||
checkdb="$phpcli $basePath/ztcli 'http://localhost/report-remind'";
|
||||
else
|
||||
checkdb="$phpcli $basePath/ztcli 'http://localhost/?m=report&f=remind'";
|
||||
fi
|
||||
echo $checkdb > $basePath/dailyreminder.sh
|
||||
echo "dailyreminder.sh ok"
|
||||
|
||||
# check database
|
||||
if [ $requestType == 'PATH_INFO' ]; then
|
||||
checkdb="$phpcli $basePath/ztcli 'http://localhost/admin-checkdb'";
|
||||
@@ -62,6 +71,7 @@ if [ ! -d "$basePath/cron" ]; then
|
||||
fi
|
||||
echo "# system cron." > $basePath/cron/sys.cron
|
||||
echo "#min hour day month week command." >> $basePath/cron/sys.cron
|
||||
echo "0 1 * * * $basePath/dailyreminder.sh # dailyreminder." >> $basePath/cron/sys.cron
|
||||
echo "1 1 * * * $basePath/backup.sh # backup database and file." >> $basePath/cron/sys.cron
|
||||
echo "1 23 * * * $basePath/computeburn.sh # compute burndown chart." >> $basePath/cron/sys.cron
|
||||
echo "1-59/2 * * * * $basePath/syncsvn.sh # sync subversion." >> $basePath/cron/sys.cron
|
||||
|
||||
Reference in New Issue
Block a user