YNICTE/Dao/DB/Schedule.윈도우scheduler.ps1

17 lines
538 B
PowerShell

https://urban1980.tistory.com/42
0. Powershell 3.0이상설치
1. 관리도구>로컬보안정책>보안설정>로컬정책>사용자권한할당>일괄작업으로로그온에 예약>계정등록
2. url호출powershell스크립트 생성 url변경해야함
$url = "http://eduadmin.kfcf.or.kr/Account/Encourage?sss=nptech1234"
$request = [System.Net.WebRequest]::Create($url)
$response = $request.GetResponse()
$response.Close()
3. shellscript호출용 batch파일생성
@echo off
PowerShell.exe -noprofile -executionpolicy bypass -FILE "?:\?\kfcfencourage.ps1"
4. 작업스케쥴러 등록