简体   繁体   English

使用PHP的Cpanel中的Cron Job

[英]Cron Job in Cpanel with PHP

I have two mysqli query which I want run on different time. 我有两个要在不同时间运行的mysqli查询。 I have read how can I do it from here 我已经从这里阅读了如何做

But I want only run if admin have set it automated from checkbox value. 但我只想在管理员将复选框值自动设置为自动的情况下运行。 Anyone can please suggest me how can I do it in cpanel ? 任何人都可以建议我如何使用cpanel?

You should to create file that checks the value of checkbox. 您应该创建检查复选框的值的文件。 if true- run the script, else- do nothing. 如果为true-运行脚本,否则-不执行任何操作。 The cron jobs should run this code. cron作业应运行此代码。

You must save the check box information of admin user in your server such as mysql. 您必须在服务器(例如mysql)中保存管理员用户的复选框信息。

And Then, you can try to implement that the file what will be excuted by crontab checkes this admin value. 然后,您可以尝试实现crontab将执行的文件检查此admin值。

Following to that value, you can finish directly or continue. 遵循该值,您可以直接完成或继续。

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

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