简体   繁体   English

使用Cron作业每x秒运行php脚本

[英]Run php script every x seconds using Cron job

I need to run a php script every x seconds. 我需要每x秒运行一个php脚本。

x seconds are stored in mysql database . x秒存储在mysql数据库中。

the cron must now its time to work from database . cron现在必须花时间从数据库开始工作。

i know how to add cron job every one minute and other static time . 我知道如何每隔一分钟和其他静态时间添加cron作业。

but this is new to me. 但这对我来说是新的。

Don't need cron job or mysql scheduler. 不需要cron作业或mysql调度程序。 If job must be run in seconds interval use SLEEP function and rerun it again and again. 如果必须在几秒钟的间隔内运行作业,请使用SLEEP功能并一次又一次地重新运行它。 Documentation 文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM