[[+content_image]]
C
C
chelkaz2016-06-12 21:38:07
Task Schedulers
chelkaz, 2016-06-12 21:38:07

How to check CRON?

Installed in CentOS 7 cron, but nothing works and no logs.
Somewhere I read about such a command, I don’t know why this is, but it can help you understand.

[[email protected] html]# ps -ef | grep cron | grep -v grep
root     10472 10123  0 10:20 pts/0    00:00:00 crontab -e
root     10473 10472  0 10:20 pts/0    00:00:00 /usr/bin/vi /tmp/crontab.s6L4AK
root     10778     1  0 10:32 ?        00:00:00 /usr/sbin/crond -n
root     12749 10123  0 13:46 pts/0    00:00:00 crontab -e
root     12750 12749  0 13:46 pts/0    00:00:00 /usr/bin/vi /tmp/crontab.l4zzII
root     12827 10123  0 13:55 pts/0    00:00:00 crontab -e
root     12828 12827  0 13:55 pts/0    00:00:00 /usr/bin/vi /tmp/crontab.Qd3ajT
root     13171 10123  0 14:20 pts/0    00:00:00 crontab -e
root     13172 13171  0 14:20 pts/0    00:00:00 /usr/bin/vi /tmp/crontab.GSGuwd
root     13233 10123  0 14:25 pts/0    00:00:00 crontab -e
root     13234 13233  0 14:25 pts/0    00:00:00 /usr/bin/vi /tmp/crontab.vnG16E

In the cron file along the path /etc/crontab I wrote:
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
* * * * * root /var/www/html/artisan schedule:run >> /dev/null 2>&1

But if I enter crontab -e
Then it is empty there, then I also registered there:
* * * * * root /var/www/html/artisan schedule:run >> /dev/null 2>&1

But there are no logs of not executing the script. I don’t understand where to dig, since I’m familiar with it at the level of writing a command and glancing at the log ... But here it’s neither one nor the other)

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
C
chelkaz, 2016-06-13
@chelkaz

The matter is that I specified root. I don't know why, but it just worked like this:
Exactly: /usr/bin/php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question