我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

从cronjob运行Cakephp3代码

Hi i want execute my code from cronjob. I have used below 2 command but its not working

/path/bin/cake transaction chekFailedTransactions

cd /path && bin/cake transaction chekFailedTransactions

Where my below is my shell code

<?php
namespace App\Shell;
use Cake\Console\Shell;
class TransactionShell extends Shell {  
    public function main() {
        $this->out('Some MSG');
    }
    public function chekFailedTransactions() {
        //Code to execute
        $this->out('Cron Executed!!');
    }
}
?>

近期文章

  • jQuery AJAX表单的问题
  • XMLwriter返回空字符串。 任何人都可以看到原因吗?
  • 从动态文本字段向mysql插入数据,并将数据插入两个表。
  • 在Apache上执行mono
  • 这个PHP Web服务调用的.NET等价物是什么?
  • 通过运行laravel raw mongodb查询选择最新记录
  • 将json值存储为angular中的会话
  • 仅在搜索运行时输出文本
  • AngularJS - 在表中逐行指令
  • PHP数组打印意外的输出格式
  • 验证损坏的复制粘贴用户输入
  • PHP从抽象类动态访问常量
  • PHP CURL(无法连接到192.168.168.85端口8080:连接超时)
  • 将值从index.twig传递给index.php
  • PHP JSON错误解析JSON文档。 该文件可能格式不正确
  • 为什么将PHP函数赋给变量执行它?
  • 不将整个表下载为.csv文件只导出10条记录(laravel 5.3)
  • 对象未找到laravel
  • 使用jQuery自动完成字段
  • 使用Twilio从浏览器拨打电话 - 呼叫自动终止

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华