Author Topic: Crontab only works manually by clicking on the 'Run'  (Read 286 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Crontab only works manually by clicking on the 'Run'
« on: January 29, 2019, 03:57:10 PM »
I runing Mautic on Centos web panel 7, but cronjob is not working.
I'll give an example.

This is one of the commands I'm using. This command updates the MaxMind - GeoLite 2 database on Mautic.
Code: [Select]
* * * * * php /home/user/public_html/mautic/app/console mautic:iplookup:download
I made him do the update every minute to get feedback if it was working, but the commands only work if I run manually (on the 'run' button). I would like the action to work automatically, as it is to be.

I already tried to put the user who will execute the command:
Code: [Select]
* * * * * user php /home/user/public_html/mautic/app/console mautic:iplookup:downloadbut that way it does not work even in the manual. 'Run'

I've already tried to fix user permissions, but I did not succeed.

What I found strange is that in the log shows in the exact minutes the actions being called, but it has no effect on the Mautic.
Command: tail -n 20 /var/log/cron


can anybody help me?

Offline
*
Re: Crontab only works manually by clicking on the 'Run'
« Reply #1 on: January 30, 2019, 04:11:26 PM »
You do realize that your cron job must point to the physical address of your php cli in whatever version of php you are using for the site.

Something like this one for automated Akeeba Backups for Wordpress:

Code: [Select]
/opt/alt/php71/usr/bin/php /home/USERNAME/public_html/wp-content/plugins/akeebabackupwp/app/cli/backup.php