I have a scree.php
file in the path:
xxx/.../Home/scree.php
I want to execute it per 5 minutes, and make sure it is thread-safety. How to do that?
I am under XShell.
It can be done using crontab.
Paste in the following code:
*/5 * * * * php /Home/scree.php
Learn more about crontab here.
You can edit the crontab in XShell:
Then in the file, you should add the code:
Then esc
:wq
out of the file.If it shows:
means success.