try to output everything to some log file i.e. add " >> /var/log/cron/worker.log 2>&1" at the end of cron job, its probably something like php not accessible globally or other silly thing just check the output and act accordingly
Your working path should be the same as your application path. To change your path use the ‘-app’ param.
Example: -app relative/path/to/myapp or -app /absolute/path/to/myapp
Available Shells:
[Bake] bake
[Migrations] migrations
[CORE] i18n, orm_cache, plugin, routes, server
[app] behavior_time, console, orm
To run an app or core command, type cake shell_name [args]
To run a plugin command, type cake Plugin.shell_name [args]
To get help on a specific command, type cake shell_name --help
but if i run this from terminal it’s work perfectly
sorry Graziel this is not the actual help message , it’s copy form the cakephp documentation. if you need i can upload that help message which i get. basically both help message are same type that why i just upload the cakephp documentation one.
yeah that would help, im using something like */10 * * * * /usr/bin/php71 /data/www/example.com/bin/cake.php Queue.Queue runworker >> /data/www/example.com/logs/worker.log 2>&1
and i dont have any problems with it so it has to be your setup you can try to add subcommand and check if its it cause i have never tried to use only ‘main’ function from shell with cron
To run an app or core command, type cake shell_name [args]
To run a plugin command, type cake Plugin.shell_name [args]
To get help on a specific command, type cake shell_name --help
@Graziel i had tested with “txp_payment” but sorry to say same help code come, If you don’t mind could you please run my shell into your cpanel server.
<?php
namespace App\Shell;
use Cake\Console\Shell;
class TxpPaymentShell extends Shell {
public function main() {
$this->out('Test Cron');
}
}
?>
and also send me the command screenshot of cpanel as i send you earlier. I will really thank full for you if you do this.
This is why I don’t use cPanel anymore. Because even a simple task has long process. I prefer using platforms, like Cloudways PHP site hosting because they have made a lot of things easier. For example, for cron job, they have simple UI where you can upload the script and schedule your crons.