Running a PHP script completely on server side

后端 未结 5 1810
眼角桃花
眼角桃花 2021-02-10 21:12

I\'m having a problem where putty gets regularly disconnected. So, when I run a PHP script from the terminal, it always gets interrupted. The script is supposed to run several h

5条回答
  •  说谎
    说谎 (楼主)
    2021-02-10 22:00

    Take a look at GNU Screen; it allows you to detach and reattach a session later, which is perfect for long-running scripts. Cron is a good option if you want it to happen in a recurring fashion; one-off batch jobs can be scheduled with something like at. For more intense computing needs, you might want to look into a more full-fledged job scheduling system like TORQUE.

提交回复
热议问题