운영체제
윈도우 Scheduled Tasks 등록 명령어
warpmemory
2016. 11. 23. 15:44
1 2 3 4 5 6 | schtasks /Create [/S system [/U username [/P [password]]]] [/RU username [/RP [password]] /SC schedule [/MO modifier] [/D day] [/M months] [/I idletime] /TN taskname /TR taskrun [/ST starttime] [/RI interval] [ {/ET endtime | /DU duration} [/K] [/XML xmlfile] [/V1]] [/SD startdate] [/ED enddate] [/IT] [/Z] [/F] | cs |
https://msdn.microsoft.com/ko-kr/library/windows/desktop/bb736357(v=vs.85).aspx
1. 5분 주기 스케줄 등록/삭제
1 2 | schtasks.exe /Create /RU "Administrator" /SC DAILY /TN python_script_5min_run /ST 00:00 /RI 5 /DU 0024:00 /K /SD 2010/12/22 /RP "ADMINISTRATOR_PASSWORD" /TR "C:\Python27\python.exe C:\python_script.py" schtasks.exe /Delete /TN python_script_5min_run /F | cs |
2. 매일 7시 30분에 스케줄 등록/삭제
1 2 | schtasks.exe /Create /RU "Administrator" /SC DAILY /TN python_script_daily_0730_run /ST 07:30 /RP "ADMINISTRATOR_PASSWORD" /TR "C:\Python27\python.exe C:\python_script.py" schtasks.exe /Delete /TN python_script_daily_0730_run /F | cs |