This question may seem repetitive, as there are many threads around with the same subject, but thing is that most solutions seems to be linked with terminal coding, which i'm not comfortable with. The problem is simple i have a php script that needs to be executed very 10 seconds. Cron job in cpanel allows only upto 1 minute. What's the workaround to let cron work every 10 seconds ?
4条回答 默认 最新
- dqsong2010 2018-08-02 05:35关注
Let the cron job run after every minute and in your
php
script the following code example might help you out. I have used counter limit to 6 because this script will run after every ten seconds and six times in one minute.<?php for($i=0;$i<6;$i++){ sleep(10); task(); } function task(){ }
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥15 matlab runtime 如何收费
- ¥20 用C语言绘制cs1.6方框透视 出现了点问题 绘制不上去 矩阵数据 和敌人坐标都是正确的
- ¥15 Tpad api账户 api口令
- ¥30 ppt进度条制作,vba语言
- ¥15 生信simpleaffy包下载
- ¥15 请教一下simulink中S函数相关问题
- ¥15 在二层网络中,掩码存在包含关系即可通信
- ¥15 端口转发器解析失败不知道电脑设置了啥
- ¥15 Latex算法流程图行号自定义
- ¥15 关于#python#的问题:我在自己的电脑上运行起来总是报错,希望能给我一个详细的教程,(开发工具-github)