Running a php script via ajax, but only if it is not already running

后端 未结 6 1627
轮回少年
轮回少年 2021-02-13 21:28

My intention is this.

My client.html calls a php script check.php via ajax. I want check.php to check if another script task.php is already being run. If it is, I do not

6条回答
  •  忘了有多久
    2021-02-13 21:48

    Too bad I didn't see this before it was accepted..

    I have written a class to do just this. ( using file locking ) and PID, process ID checking, on both windows and Linux.

    https://github.com/ArtisticPhoenix/MISC/blob/master/ProcLock.php

提交回复
热议问题