I setup the crons in ubuntu server for php services using wget and I run crons on every 5 min. It was worked good for some days. Recently, I got an issue that service is running twice or thrice (as per output of application logs) but cron ran for only one time (as per syslog).
I have gone through with link Why is this cron entry executed twice? but it didn't work for me. I have only one PID (ps -aux | grep 'cron') and I restarted,stopped,started the cron service (service cron restart/stop/start) but none of them worked for me. So finally I restarted the server as cron job is init service but after restarting also, I got same issue.
Cron running as root user.
Cron:
*/5 * * * * /usr/bin/wget --no-check-certificate https://**********/controlller/method
From Syslog:
Jul 31 12:05:01 web-server CRON[26997]: (root) CMD (/usr/bin/wget --no-check-certificate https://xx.xx.xx.xx/controller/method)
Jul 31 12:10:01 web-server CRON[27222]: (root) CMD (/usr/bin/wget --no-check-certificate https://xx.xx.xx.xx/controller/method)
Jul 31 12:15:01 web-server CRON[27470]: (root) CMD (/usr/bin/wget --no-check-certificate https://xx.xx.xx.xx/controller/method)
Jul 31 12:20:01 web-server CRON[27768]: (root) CMD (/usr/bin/wget --no-check-certificate https://xx.xx.xx.xx/controller/method)
ps -aux | grep 'cron'
root 1079 0.0 0.0 26012 696 ? Ss Jul30 0:03 cron
From Application logs:
31 Jul 2019 12:05:01 [26836] DEBUG [xx.xx.xx.xx]:entered into controller/method
31 Jul 2019 12:05:01 [26922] DEBUG [xx.xx.xx.xx]:entered into controller/method
31 Jul 2019 12:13:00 [27378] DEBUG [xx.xx.xx.xx]:entered into controller/method
31 Jul 2019 12:13:01 [27376] DEBUG [xx.xx.xx.xx]:entered into controller/method
31 Jul 2019 12:23:47 [27733] DEBUG [xx.xx.xx.xx]:entered into controller/method
31 Jul 2019 12:23:47 [27674] DEBUG [xx.xx.xx.xx]:entered into controller/method
From Apache2 access logs:
xx.xx.xx.xx - - [31/Jul/2019:12:05:01 +0200] "GET /controller/method HTTP/1.1" 200 6914 "-" "Wget/1.15 (linux-gnu)"
xx.xx.xx.xx - - [31/Jul/2019:12:05:01 +0200] "GET /controller/method HTTP/1.1" 200 6909 "-" "Wget/1.15 (linux-gnu)"
xx.xx.xx.xx - - [31/Jul/2019:12:13:01 +0200] "GET /controller/method HTTP/1.1" 200 6862 "-" "Wget/1.15 (linux-gnu)"
xx.xx.xx.xx - - [31/Jul/2019:12:13:00 +0200] "GET /controller/method HTTP/1.1" 200 6862 "-" "Wget/1.15 (linux-gnu)"
xx.xx.xx.xx - - [31/Jul/2019:12:23:47 +0200] "GET /controller/method HTTP/1.1" 200 6862 "-" "Wget/1.15 (linux-gnu)"
xx.xx.xx.xx - - [31/Jul/2019:12:23:47 +0200] "GET /controller/method HTTP/1.1" 200 6862 "-" "Wget/1.15 (linux-gnu)"