How to execute shell commands synchronously in PHP

后端 未结 5 921
小鲜肉
小鲜肉 2020-12-01 20:36

I need to run multiple scripts(5 scripts) via cmd, I want to make sure unless and until the first script finishes the second should not initiate. Thus after first script com

5条回答
  •  情话喂你
    2020-12-01 21:17

    In my opinion, it would be better to run cronjobs. They will execute synchronously. If the task is "on-the-fly", you could execute the command to add this cronjob. More information about cronjobs: http://unixgeeks.org/security/newbie/unix/cron-1.html

    http://service.futurequest.net/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=30

提交回复
热议问题