我需要通过php在twitter上按时推特,日期由用户设置。为此,我计划使用通过php动态创建的Cron作业。
任何人都能告诉我如何只通过PHP创建cron作业吗。
在服务器中设置cron-url。还可以设置Interval。
为什么不使用Cronjob?Cron Job+Twitter
如果您只想通过PHP创建cron作业,则必须通过必须触发的方式运行PHP文件。
您的网站的主要index.php文件。
<?php
if (hour == 14) include cron.php and call function or class method etc.
?>