Linux crontab scheduled tasks are not executed

set
05 17 * cd / root/crawler/test&& scrapy crawl test cannot execute
but the command cd / root/crawler/test&& scrapy crawl test can be executed successfully on the command line

.
Sep.07,2021

your cron is set to execute this command at 17:05 every day.
it is important to note that this time is the machine's NTP time and is not necessarily the same as your local time.

according to the information you provide, the possible reasons are:

  1. the time has passed when the task is started. It is recommended to set it to * / 1 * cd / root/crawler/test & & sh scrapy crawl test to try every minute
  2. does not take effect. You can view
  3. in crontab-l.
  4. permissions are incorrect or error reported. You can check log (if it is ubuntu) grep CRON / var/log/syslog , and others may be tail-f / var/logs/cron
Menu