Mautic Community Forums

CRON error: Bad fd number

My CRON script has been emailing me intermittently with the following error:

Code:
/bin/sh: 1: Syntax error: Bad fd number
Anyone had this issue and know how to resolve it?
Thanks in advance!

My CRON script has been emailing me intermittently with the following error:

/bin/sh: 1: Syntax error: Bad fd number

Anyone had this issue and know how to resolve it?
Thanks in advance!

Turns out to be operator error. There was an extra character at the end of my cron job that shouldn’t have been there. Must have accidentally typed it and saved. Removed and all seems to work well.
BAD CRON:

*/16 * * * * php /path/to/matuic/app/console mautic:campaigns:update > /dev/null 2>&15

GOOD CRON:
Remove the 5 at the very end. How’d that get there? (scratches head)

*/16 * * * * php /path/to/mautic/app/console mautic:campaigns:update > /dev/null 2>&1

Hope this helps someone else.