Why is this cron entry executed twice?

cron

Solution

Nothing in the description gives reason for it to be executed twice. Look elsewhere.

- Do two users call it?

- Is it entered twice?

- Does it call itself?

- Does it set in motion conditions for repetition?

If it's a shell script you're executing, have it append `whoami` and `date` to a log file. You should be able to dig up the reason.

UPDATE

Type `ps -A | grep crond`, make sure crond isn't running twice.

Problem

``` */5 * * * * my command ``` This entry works but every 5 minutes it gets executed twice, why? In `/var/log/cron` it shows: ``` Jun 16 22:20:01 Test CROND[12512]: (root) CMD (my command) Jun 16 22:20:01 Test CROND[12516]: (root) CMD (my command) ``` So it's not from two users. It is only entered once with `crontab -e -u root`. The command is a php command.

Original source

Related problems