Author Topic: Crontab only works manually by clicking on the 'Run'  (Read 2662 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

Offline
*
Re: Crontab only works manually by clicking on the 'Run'
« Reply #2 on: April 07, 2021, 09:30:32 PM »
Hi, have exactly same problem with my cron job. If I click on run so cron working perfectly, but not automatically every 12 hours as planned:


Code: [Select]
0 0,12 * * * sudo tar -cvpzf /home/backups/myhomepage_$( date +"%Y_%m_%d_%H-%M-%S" ).tar.gz -C /home/myhomepage/ public_html
Code: [Select]
0 0,12 * * * /usr/bin/mysqldump --routines -u mydatabase -p'mypassword' mydatabase |  gzip >  /home/backups/mydatabase_$( date +"%Y_%m_%d_%H-%M-%S" ).sql.gz
need some help, please

Regards guys

Offline
*
Re: Crontab only works manually by clicking on the 'Run'
« Reply #3 on: April 09, 2021, 11:18:12 AM »
No answer yet although I have the PRO version, very strange

Offline
*
Re: Crontab only works manually by clicking on the 'Run'
« Reply #4 on: April 13, 2021, 02:26:05 PM »
Hello... same here... manually work perfectly but not automatic!

Offline
*
Re: Crontab only works manually by clicking on the 'Run'
« Reply #5 on: April 14, 2021, 02:43:16 AM »
i happened to me, so i found out that package that the user belonged, has no enough inodes to support the cronjob

Offline
*
Re: Crontab only works manually by clicking on the 'Run'
« Reply #6 on: April 14, 2021, 01:45:48 PM »
i happened to me, so i found out that package that the user belonged, has no enough inodes to support the cronjob

hello! i have inodes in 0

Offline
*
Re: Crontab only works manually by clicking on the 'Run'
« Reply #7 on: April 15, 2021, 12:22:28 AM »
Did you check out your logs ?