Are There Any Cron Jobs Alternative?

前端 未结 8 2082
礼貌的吻别
礼貌的吻别 2020-12-09 19:43

Cron Jobs are closed on my server and server admin doesn\'t accept open it. Because , cron jobs slowing server etc. So, i need an alternative.

I have to run a php fi

8条回答
  •  余生分开走
    2020-12-09 19:48

    Even though the question was posted a while ago, I just had the same problem but found a solution (based on Kissaki's answer, thanks!) and thought I'd post it here for anyone still looking for a possible solution.

    Prerequisites:

    • SSH access
    • Python

    Code (python):

    from subprocess import call
    import time
    while True:
        call(["php","cron.php"])
        time.sleep(120)
    

提交回复
热议问题