@echo off
title FTS 1.0
:begin
cls
echo.
echo Freecommand Task Scheduler 1.0
echo last update 11/12/24
echo ─────────────────
echo 0. task schedule
echo ─────────────────
echo 1. create task
echo 2. change command^&comment in task
echo 3. run task now
echo 4. stop task
echo 5. delete task
echo 6. delete all task
echo ─────────────────
echo h. help
echo i. program infomation
echo x. exit task scheduler
echo ─────────────────
echo.
set /p men1=select menu :
if "%men1%"=="0" goto 000
if "%men1%"=="1" goto 001
if "%men1%"=="2" goto 002
if "%men1%"=="3" goto 003
if "%men1%"=="4" goto 004
if "%men1%"=="5" goto 005
if "%men1%"=="6" goto schtasks /delete /tn *
if "%men1%"=="h" goto help
if "%men1%"=="i" goto info
if "%men1%"=="x" goto :EOF
goto begin
:000
echo.
echo ─────────────────
echo 1. task table
echo 2. task list
echo 3. task csv
echo 4. detailed task list
echo 5. detailed task csv
echo ─────────────────
echo m. main menu
echo ─────────────────
echo.
set /p spt=select print type :
if %spt%==1 schtasks /query
if %spt%==2 schtasks /query /fo list
if %spt%==3 schtasks /query /fo csv
if %spt%==4 schtasks /query /fo list /v
if %spt%==5 schtasks /query /fo csv /v
if %spt%==m schtasks goto begin
echo.
pause
goto begin
:001
echo.
set /p ITN=input taskname :
echo.
echo ─────────────────
echo task type
echo ─────────────────
echo 1. alarm message
echo 2. free command
echo ─────────────────
echo m. main menu
echo ─────────────────
echo.
set /p STT=select task type :
if %STT%==1 set STTV=net send %computername%
if %STT%==1 set scmtd=comment
if %STT%==2 set STTV=
if %STT%==2 set scmtd=command
if %STT%==m goto begin
echo.
echo ─────────────────
echo period type
echo ─────────────────
echo 1. once
echo 2. minute
echo 3. hourly
echo 4. daily
echo 5. weekly
echo 6. monthly
echo 7. on start
echo 8. on idle
echo ─────────────────
echo m. main menu
echo.
set /p period=select period type :
if %period%==1 goto Prd1
if %period%==2 goto Prd2
if %period%==3 goto Prd3
if %period%==4 goto Prd4
if %period%==5 goto Prd5
if %period%==6 goto Prd6
if %period%==7 goto Prd7
if %period%==8 goto Prd8
if %period%==m goto begin
:Prd1
echo.
set /p sdate=set date(yyyy/mm/dd) :
set /p stime=set time(HH:mm) :
set /p cmd=set %scmtd% :
echo.
schtasks /create /tn "%ITN%" /tr "%STTV%%cmd%" /sc once /st %stime%:00 /sd %sdate% /ru "system"
pause
goto begin
:Prd2
echo.
set /p sdate=set date(yyyy/mm/dd) :
set /p stime=set time(HH:mm) :
set /p edate=set end date(yyyy/mm/dd, omissible, if you wish input "//") :
if "%edate%"=="//" set edate=
if not "%edate%"=="//" set edater=/ed %edate%
set /p sprd=set period(min, 1~1439) :
set /p cmd=set %scmtd% :
echo.
schtasks /create /tn "%ITN%" /tr "%STTV%%cmd%" /sc minute /mo %sprd% /st %stime%:00 /sd %sdate% %edater%/ru "system"
pause
goto begin
:Prd3
echo.
set /p sdate=set date(yyyy/mm/dd) :
set /p stime=set time(HH:mm) :
set /p edate=set end date(yyyy/mm/dd, omissible, if you wish input "//") :
if "%edate%"=="//" set edate=
if not "%edate%"=="//" set edater=/ed %edate%
set /p sprd=set period(hour, 1~23) :
set /p cmd=set %scmtd% :
echo.
schtasks /create /tn "%ITN%" /tr "%STTV%%cmd%" /sc hourly /mo %sprd% /st %stime%:00 /sd %sdate% %edater%/ru "system"
pause
goto begin
:Prd4
echo.
set /p sdate=set date(yyyy/mm/dd) :
set /p stime=set time(HH:mm) :
set /p edate=set end date(yyyy/mm/dd, omissible, if you wish input "//") :
if "%edate%"=="//" set edate=
if not "%edate%"=="//" set edater=/ed %edate%
set /p sprd=set period(day, 1~365) :
set /p cmd=set %scmtd% :
echo.
schtasks /create /tn "%ITN%" /tr "%STTV%%cmd%" /sc daily /mo %sprd% /st %stime%:00 /sd %sdate% %edater%/ru "system"
pause
goto begin
:Prd5
echo.
set /p sdate=set date(yyyy/mm/dd) :
set /p stime=set time(HH:mm) :
set /p edate=set end date(yyyy/mm/dd, omissible, if you wish input "//") :
if "%edate%"=="//" set edate=
if not "%edate%"=="//" set edater=/ed %edate%
set /p sprd=set period(week, 1~52) :
set /p sday=set day(SUN, MON, TUE, WEN, THE, FRI, SAT, *) :
set /p cmd=set %scmtd% :
echo.
schtasks /create /tn "%ITN%" /tr "%STTV%%cmd%" /sc weekly /mo %sprd% /d %sday% /st %stime%:00 /sd %sdate% %edater%/ru "system"
pause
goto begin
:Prd6
echo.
set /p sdate=set date(yyyy/mm/dd) :
set /p stime=set time(HH:mm) :
set /p edate=set end date(yyyy/mm/dd, omissible, if you wish input "//") :
if "%edate%"=="//" set edate=
if not "%edate%"=="//" set edater=/ed %edate%
echo.
echo ─────────────────
echo month command type
echo ─────────────────
echo 1. set day^&month period
echo 2. lastday (set task at selected month lastday)
echo 3. set week^&day
echo 4. set month^&day
echo ─────────────────
echo m. main menu
echo ─────────────────
echo.
set /p mtmen=select type :
if %mtmen%==1 goto mtm1
if %mtmen%==2 goto mtm2
if %mtmen%==3 goto mtm3
if %mtmen%==4 goto mtm4
if %mtmen%==m goto begin
:mtm1
set /p sprd=set month period(1-12) :
set /p sday=set day(1-31) :
set /p cmd=set %scmtd% :
echo.
schtasks /create /tn "%ITN%" /tr "%STTV%%cmd%" /sc monthly /mo %sprd% /d %sday% /st %stime%:00 /sd %sdate% %edater%/ru "system"
pause
goto begin
:mtm2
set sprd=LASTDAY
set /p smon=set month(JAN - DEC, *) :
set /p cmd=set %scmtd% :
echo.
schtasks /create /tn "%ITN%" /tr "%STTV%%cmd%" /sc monthly /mo %sprd% /m %smon% /st %stime%:00 /sd %sdate% %edater%/ru "system"
pause
goto begin
:mtm3
set /p sprd=set week(FIRST, SECOND, THIRD, FOURTH, LAST, *) :
set /p sday=set day(SUN, MON, TUE, WEN, THE, FRI, SAT, *) :
set /p cmd=set %scmtd% :
echo.
schtasks /create /tn "%ITN%" /tr "%STTV%%cmd%" /sc monthly /mo %sprd% /d %sday% /st %stime%:00 /sd %sdate% %edater%/ru "system"
pause
goto begin
:mtm4
set /p sprd=set month(JAN-DEC) :
set /p sday=set day(1-31) :
set /p cmd=set %scmtd% :
echo.
schtasks /create /tn "%ITN%" /tr "%STTV%%cmd%" /sc monthly /d %sday% /m %smon% /st %stime%:00 /sd %sdate% %edater%/ru "system"
pause
goto begin
:Prd7
echo.
set /p sdate=set start date(yyyy/mm/dd) :
set /p cmd=set %scmtd% :
echo.
schtasks /create /tn "%ITN%" /tr "%STTV%%cmd%" /sc onstart /sd %sdate% /ru "system"
pause
goto begin
:Prd8
echo.
set /p sdate=set start date(yyyy/mm/dd) :
set /p stime=set start time(HH:mm) :
set /p itime=set idle time(min) :
set /p cmd=set %scmtd% :
echo.
schtasks /create /tn "%ITN%" /tr "%STTV%%cmd%" /sc onidle /i %itime% /st %stime%:00 /sd %sdate% /ru "system"
pause
goto begin
:002
echo.
echo ─────────────────
echo task type
echo ─────────────────
echo 1. alarm message
echo 2. free command
echo ─────────────────
echo m. main menu
echo ─────────────────
echo.
set /p STT=select task type :
if %STT%==1 set STTV=net send %computername%
if %STT%==1 set scmtd=comment
if %STT%==2 set STTV=
if %STT%==2 set scmtd=command
if %STT%==m goto begin
echo.
set /p tn=input taskname :
set /p tr=input new %scmtd% :
echo.
schtasks /change /tn "%tn%" /tr "%tr%"
pause
goto begin
:003
schtasks /query
echo.
set /p tn=input taskname :
echo.
schtasks /run /tn "%tn%"
pause
goto begin
:004
schtasks /query
echo.
set /p tn=input taskname :
echo.
schtasks /end /tn "%tn%"
pause
goto begin
:005
schtasks /query
echo.
set /p tn=input taskname :
echo.
schtasks /delete /tn "%tn%"
pause
goto begin
=====================================================
스케쥴 매니저 같은건데
알림메세지는 관리도구에서 메신저 옵션을 사용중이어야 사용할 수 있음
복붙해서 메모장에 저장하고 확장자를 bat으로 바꾸면 됨
크리스마스선물이네