bad cron entry
the journal of Michael Werneburg
twenty-eight years and a million words
For the past seven or eight months, I've had several backup jobs under different users on my new server working just fine. One of them has been failing with this strange message, which was driving me crazy.
From username@hostname Sat Jun 21 13:07:00 2025
From: Cron Daemon <username@hostname>
To: username
Subject: Cron <username@hostname> * /home/username/util/filesbackup.cron
Date: Sat, 21 Jun 2025 13:07:00 +0900
/bin/sh: cgi-bin: not found
For the life of me, I couldn't work out why it was trying to execute cgi-bin when that was merely the first folder in the list. "Happily", the weather outside is too hot to bother going outdoors, so while I was doing some other things I had a look at this.
And I worked it out. See the asterisk? I had too many asterisks in my crontab file. Instead of this:
38 15 * * * /home/username/util/filesbackup.cron
I had this:
38 15 * * * * /home/username/util/filesbackup.cron
Part of my brain knew this was wrong. Of course, what is insanely dangerous about this situation is that the first thing in the folder could have been called 'rm' or 'unlink' or who know what. Anyway, let that be a lesson to all of us. Hopefully in the entire world I'm the only one this reckless.