From d1b98918125a2931e4981d7bbdcdd50e4e609c86 Mon Sep 17 00:00:00 2001 From: zhujinyong Date: Tue, 19 Feb 2013 05:45:59 +0000 Subject: [PATCH] + add dailyreminder to cron. --- bin/init.bat | 16 +++++++++++++--- bin/init.sh | 10 ++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/bin/init.bat b/bin/init.bat index 80cf41eaea..bd7962e3af 100644 --- a/bin/init.bat +++ b/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 diff --git a/bin/init.sh b/bin/init.sh index a4c402656b..c629412e01 100755 --- a/bin/init.sh +++ b/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