- 新しい順
- 投票が多い順
- コメントが多い順
Hello.
Can you confirm that cron.d is started with the command below?
systemctl status cron
Also, can you check cron logs with the command below?
journalctl -r -u cron
Will it be successful if I run the command normally in bash shell instead of cron?
Yes,.
Last login: Fri Jan 5 04:38:36 2024 from 24.4.46.54 bitnami@ip-123-23-13-213:~$ systemctl status cron ● cron.service - Regular background program processing daemon Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: enabled) Active: active (running) since Mon 2023-12-11 19:45:09 UTC; 3 weeks 3 days ago Docs: man:cron(8) Main PID: 565 (cron) Tasks: 1 (limit: 2311) Memory: 48.7M CPU: 8min 6.666s CGroup: /system.slice/cron.service └─565 /usr/sbin/cron -f
cron itself is active, so there seems to be no problem. Can you change the cron settings as below and check what is written in result.txt?
0 12 * * * wget -q -O- https://crm.slescom.com/cron/index > /tmp/result.txt
Also, please make sure that "wget -q -O- https://crm.slescom.com/cron/index" etc. is executed by cron using the following command.
journalctl -r -u cron
The commands are failing because crm.slescom.com doesn't resolve, and going up a level slescom.com isn't registered (a whois fails https://who.is/whois/slescom.com )
$ nslookup crm.slescom.com
Server: dns.google
Address: 8.8.8.8
*** dns.google can't find crm.slescom.com: Non-existent domain
Double-check you have the correct URL.
Minor point, but if you want to run the command every day at midnight the crontab needs to be 0 0 * * *
and not 0 12 * * *
(this runs it at midday).
in the console, I get 500 internal server error