如何在Windows机器上调用带有事件的php文件?

Assume that we have a device which sends data (a file) back to the computer whenever something unexpected happens. Let's say if it detects a movement, it will send a data file to the computer.

The computer should notice and parse this file. Afterwards, it should execute a PHP file to do other stuff.

Currently we are using scheduled tasks on windows, but this checks the status minimum every 1 minute. Is there any way to detect this as soon as we received this? What can be used?

EDIT: In other words, how can I set a trigger to execute the php?

EDIT: there was a typo. I wrote pdf instead of php.

One thing you can do is write a simple Windows Service, which will parse the file once received.

look into FileSystemWatcher to detect the file. this way you don't need to schedule any task.

Now as for the PHP script you should be able to start a command line process and execute the php.

You could look into http://gruntjs.com/ and use it as a listener for changes on a directory. This could be used to trigger a PHP script.