0

I did a ImageMagick install on my CentOS webserver and afterwards my cronjobs do not work anymore.

I have cronjobs that executes php files. For example one cronjob execute every 15 minutes a php file that reads a json file and insert variables in my mysql database. I did not change the php files and they still work from the command line with php -q /home/admin/domains/domain.nl/public_html/command/myfile.php

The status of my cron is:

[admin@server domains]$ service crond status
Redirecting to /bin/systemctl status crond.service
● crond.service - Command Scheduler
   Loaded: loaded (/usr/lib/systemd/system/crond.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2020-07-10 22:52:30 CEST; 10h ago
 Main PID: 13519 (crond)
   CGroup: /system.slice/crond.service
           └─13519 /usr/sbin/crond -n

I have tried to restart my server, I have restart my cron service without result.

My /var/log/cron looks like

Jul 11 09:13:01 server CROND[11480]: (root) CMD (/usr/local/directadmin/dataskq)
Jul 11 09:14:01 server CROND[11629]: (root) CMD (/usr/local/directadmin/dataskq)
Jul 11 09:15:01 server CROND[11792]: (root) CMD (/usr/local/directadmin/dataskq)
Jul 11 09:15:01 server CROND[11791]: (admin) CMD (php -q /home/admin/domains/domain.nl/public_html/command/myfile.php)
Jul 11 09:16:01 server CROND[11931]: (root) CMD (/usr/local/directadmin/dataskq)
Jul 11 09:17:01 server CROND[12075]: (root) CMD (/usr/local/directadmin/dataskq)
Jul 11 09:18:01 server CROND[12244]: (root) CMD (/usr/local/directadmin/dataskq)
Jul 11 09:19:01 server CROND[12375]: (root) CMD (/usr/local/directadmin/dataskq)
Jul 11 09:19:43 server crontab[13932]: (root) LIST (admin)
Jul 11 09:20:01 server CROND[13993]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Jul 11 09:20:01 server CROND[13994]: (root) CMD (/usr/local/directadmin/dataskq)
Jul 11 09:21:01 server CROND[14168]: (root) CMD (/usr/local/directadmin/dataskq)

With

php -q /home/admin/domains/domain.nl/public_html/command/myfile.php 2>&1 >>php -q /home/admin/domains/domain.nl/public_html/command/errorlog.txt

I try to view an extra error log, but the output to errorlog.txt is empty (but the file is made!).

So I do not understand why the php file is doing nothing? What steps can I do to find the problem with the cronjob?

Installing imageMagick was not easy. I also used the command: mount -o remount,exec /tmp

0 Answers0