Home  >  Article  >  Backend Development  >  Windows - Issues related to content changes in php monitoring folders

Windows - Issues related to content changes in php monitoring folders

WBOY
WBOYOriginal
2016-08-04 09:20:011722browse

I want to monitor the filemtime of a folder every 5 seconds, and then realize its function by comparing the similarities and differences of the filemtime twice. $filetime1 = filemtime("PATH.txt");sleep(10);$filetime2 = filemtime("Path.txt"), but in the end, the time obtained by the two filemtimes are the same, I just want I would like to ask if there is any function that can realize its real-time monitoring function. I am using a Windows system. Is there a scheduled task method similar to Linux's crontab on Windows?

Reply content:

I want to monitor the filemtime of a folder every 5 seconds, and then realize its function by comparing the similarities and differences of the two filemtimes.

$filetime1 = filemtime("PATH.txt");sleep(10);$filetime2 = filemtime("Path.txt"), but in the end, the time obtained by the two filemtimes are the same, I just want I would like to ask if there is any function that can realize its real-time monitoring function. I am using a Windows system. Is there a scheduled task method similar to Linux's crontab on Windows?

For windows, you just need to install urlcron

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn