RX/XE 팁
XE FAQ 는 제가 XE공홈 '묻고 답하기'에 답변한 내용들 중 일부를 정리한 내용입니다. (대부분이 제가 한 답변이죠)
XE Tips 는 제가 XE 공홈에 쓴 XE 관련 유용한 팁들입니다. 기능개선은 공홈에 안 적어둔 XE 유용 개선팁들입니다.
유용정보는 외부 검색을 통해 알아낸 소스등을 기재해둔 곳입니다.
버그 신고내역들은 XE 사용하다가 발견한 버그 패치방법들로, Core Issue 에 기록해뒀기에 XE 에 적용이 되었을 가능성이 있겠죠

제가 쓴 글들에 대해 퍼가실때는 꼭 출처를남겨주시고.. (다만 플래시뷰 기반이기에 퍼가기는조금 힘들 수 있겠죠 ^^;)
타회원의 글들도 적혀있는 출처를 같이 꼭 기재해주세요
출처 DeveloperSide.NET 
출처URL https://www.devside.net/wamp-server/running-php-scripts-as-cron-jobs-on-windows 

Running PHP Scripts as Cron Jobs on Windows

How do I hit a set of web pages to run scripts that perform tasks or update data?

Is there a way to set up a cron job or at least execute a php file to run every so often?

On Windows you would use the “Windows Task Scheduler” to execute PHP scripts either via a URL, or directly via a path to php.exe – at specific time intervals (or on specific events).

Run PHP Script Via URL

To hit a URL you can use command line tools such as “wget” or “curl” (wget and curl are already included in WampDeveloper Pro under the Tools folder), and for multiple URLs you would wrap it all up into 1 batch file.

For example, to hit this URL…
http://domain.name/webapp/tools/cron.php

You would use “wget” by executing this command…

C:\WampDeveloper\Tools\gnuwin32\wget.exe -q -O NUL http://domain.name/webapp/tools/cron.php

* The “-q” switch makes wget silent and the “-O NUL” option discards the output (instead of saving it to a file).

Set up a “Windows Scheduled Task” (via “Task Scheduler”)…

Create Task...
Triggers: Daily
Advanced settings... Repeat task every: 5 minutes; Indefinitely
Action: Start a program
Program/script: C:\WampDeveloper\Tools\gnuwin32\wget.exe
Arguments: -q -O NUL http://domain.name/webapp/tools/cron.php
Start In: C:\WampDeveloper\Tools\gnuwin32\

Run PHP Script Directly

An even simpler and more straight-forward way to perform the above is to just run the PHP scripts directly without involving Apache, or anything other than the PHP interpreter/engine (php.exe)…

For example, to create a Task that executes this PHP file every 5 minutes…
C:\WampDeveloper\Websites\domain.name\webroot\webapp\tools\cron.php

Set up a “Windows Scheduled Task” (via “Task Scheduler”)…

Create Task...
Triggers: Daily
Advanced settings... Repeat task every: 5 minutes; Indefinitely
Action: Start a program
Program/script: C:\WampDeveloper\Components\Php\php.exe
Arguments: -f C:\WampDeveloper\Websites\domain.name\webroot\webapp\tools\cron.php
Start In: C:\WampDeveloper\Websites\domain.name\webroot\

* The ‘start in’ path would need to reflect the path the script is expecting to be started in (so all its inner relative paths work). Usually this is either the webapp’s folder, or the folder the script is in.

You could also create this Task via the command-line –

schtasks /create /sc minute /mo 5 /tn "my task name" /tr "C:\WampDeveloper\Components\Php\php.exe -f C:\WampDeveloper\Websites\domain.name\webroot\webapp\tools\cron.php"

* The command-line method doesn’t allow a start-in directory.

Run Multiple PHP Scripts via Batch File

If you have multiple scripts or URLs to hit on 1 Task, create a batch file (filename.bat) containing multiple instances of the above commands…

C:\WampDeveloper\Tools\gnuwin32\wget.exe -q -O NUL http://domain.name/url1
C:\WampDeveloper\Tools\gnuwin32\wget.exe -q -O NUL http://domain.name/url2
C:\WampDeveloper\Tools\gnuwin32\wget.exe -q -O NUL http://domain.name/url3
C:\WampDeveloper\Components\Php\php.exe -f C:\WampDeveloper\Websites\domain.name\webroot\path\file1.php
C:\WampDeveloper\Components\Php\php.exe -f C:\WampDeveloper\Websites\domain.name\webroot\path\file2.php
C:\WampDeveloper\Components\Php\php.exe -f C:\WampDeveloper\Websites\domain.name\webroot\path\file3.php

Set up a “Windows Scheduled Task” (via “Task Scheduler”)…

Create Task...
Triggers: Daily
Advanced settings... Repeat task every: 5 minutes; Indefinitely
Action: Start a program
Program/script: C:\path\filename.bat
Arguments:
Start In: C:\path\

Authentication with User and Password

If the URL requires authentication or authorization, use wget with these extra switches to perform HTTP Authentication:

wget -q -O NUL --user=username --password=password http://url

In some obscure situations, switch: --auth-no-challenge might need to be used.

Also, in newer versions of wget, the “--user” and “--password” switches might be replaced with “--http-user” and “--http-password“.

Debugging Issues

If wget is unable to hit the URL or script, run it directly from the command line without silencing the output (i.e., don’t use -q -O NUL) to find out what the exact issue is:

wget http://url
전체 252건
번호 카테고리 제목 출처 등록일 조회
공지 XE 기능개선 XE 1.11.18 이후 버전의 익명 수정 버그 수정법 xetown  2023.10.07 2756
공지 XE 기능개선 XE 1.11.14 보안패치 - 타인의 쪽지 내용을 확인할 수 있는 버그 패치방법 xetown  2023.10.03 2853
공지 XE 기능개선 XE 1.11.6 이후 보안배치 #4 file rhymix  2022.07.05 2936
공지 1.11.6 XE 1.11.6 이후 보안배치 #3 rhymix  2022.04.02 2927
공지 1.11.6 XE 1.11.6 이후 보안배치 #1 xetown  2021.06.22 3292
공지 1.11.6 XE 1.11.6 이하 에서 공개댓글을 비밀댓글로 변경시 생길 수 있는 오류 수정법 sejin7940  2021.01.10 3222
공지 XE 기능개선 XE 1.11.4 이후에서 파일 업로드시 정상 작동 안 하는 현상 수정법 XE github  2019.04.02 6001
공지 XE 기능개선 php 7.1 환경에서 XE 오류 나는 경우 확인할 사항 sejin7940  2018.07.11 5928
공지 유용정보 php7.2 환경에서 XE 오류가 생기는 경우 - Object 클래스 변경 필요 XE Github  2017.11.27 8270
공지 XE 기능개선 XE 1.8.30 이하에서 반드시 수정해주셔야하는 부분입니다. XE 1.8.31  2017.02.26 6695
공지 1.8.18 XE 1.8.18 에서 사용시 반드시 수정해야할 사항들 ( XE 1.8.20 이후에서는 수정 불필요 ) xetown  2016.04.03 25808
공지 XE 기능개선 XE 1.8.12 이후부터 proc controller 일부가 작동 안 할 경우 확인할 부분 [1] XE  2015.10.16 25627
112 유용정보 activeX 지원 중단에 따른 대응책과 PG사 들 지원현황 빈꿈 EMPTYDREAM  2015.09.04 1047
111 유용정보 FTP 관련 함수들 php  2015.08.25 1054
110 유용정보 유튜브 youtube , 비메오등 iframe 이나 embed 기반의 영상 크기 반응형화 되도록 avex  2015.08.10 1163
109 유용정보 모바일에서 스케치북 스킨 사용시, 댓글은 에디터가 안 되는 현상 수정방법 sejin7940  2015.08.08 1321
108 유용정보 JQuery Mobile 를 이용한 페이지 전환 효과 6종 with brother  2015.07.31 1223
107 유용정보 html 문서를 엑셀추출시 줄바꾸기(엑셀의 alt+enter) 처리하려면 phpschool  2015.07.16 3061
» 유용정보 window 서버에서의 cron 작업 관련해서.. DeveloperSide.NET  2015.06.25 1113
105 유용정보 float을 clear하는 4가지 방법 - float 사용시 상위 div 가 통째로 못 덮는 문제 해결법 NARADESIGN  2015.06.19 1224
104 유용정보 background style 속성들 토종마을  2015.05.24 1119
103 유용정보 json 형식이 맞는지 확인하는 사이트 sejin7940  2015.04.25 1346
102 유용정보 jquery library include 하는 소스 google  2015.04.15 965
101 유용정보 크롬에서 table에 tr 또는 td 를 display none, block 할때 화면깨지는 현상 안드로이드개발자  2015.03.24 2781
100 유용정보 서버시간 확인 사이트 http://time.navyism.com/  2015.02.25 1122
99 유용정보 웹폰트 제작 및 생성방법 koreawebdesign  2015.02.08 1417
98 유용정보 본문 글쓸때 유저도 iframe 사용할 수 있게 하려면 XE  2015.01.27 1035
97 유용정보 레이아웃이나 스킨 등 템플렛에서 $_SESSION 세션변수 사용하는 방법 신평  2015.01.27 1143
96 유용정보 XE 모듈명 및 act 함수명 정의시 유의할 사항 - admin 이라는 문구에 대해 sejin7940  2015.01.11 1181
95 유용정보 로그인한 회원이 특정 그룹에 속하는지 여부 if문 sejin7940  2015.01.01 1274
94 유용정보 현재 페이지가 ssl 형태인지 확인하는 방법 sejin7940  2015.01.01 1181
93 유용정보 내 스크랩 목록 과 작성글 목록에서 제목 옆에 게시판 제목 출력시키는 방법 sejin7940  2014.12.31 1208
XE Login