Cronjob notice in Mautic log

Hi everybody,

My Mautic version is: 4.4.12
My PHP version is: 8.0.30

My problem is that I get a notice in my logs regarging my cronjobs:
"mautic.NOTICE: Symfony\Component\Console\Exception\CommandNotFoundException: Command “mautic:segments:update " is not defined. Did you mean one of these?..”

I already tried to re-install the cronjob, but nothing is working. I see a space between mautic:segments:uipdate and the ". And when I look at my conjobs with the crontab -l command i see the following:

afbeelding

I don’t know where the “\r” comes from at the end of every cronjob? Can this have something to do with the notice? If so, how can I delete this \r? Because when I edit the cronjobs in the nano editor the \r is not showing.

Any help much appreciated!

/r is the ‘carriage return’ in windows. (in other words ENTER)
There is something wrong with the tool you use to edit the crontab.
J

1 Like

Joey is partially right: You used a Windows specific app to modify/update your crontab. And Windows isn’t really compatible with *nix systems.

But…
The error reported sounds more like your crontab see a blank like a End of Line.

So…
In addition of removing those /r, I would suggest you to put your cmd in quotes like so:
* * * * * php "/var/www/html/bin/console mautic:segment:update"

I used a Macbook and edited the file in the Atom app before I copied the cronjons to the terminal.

adding the " " seems to do the trick!

1 Like

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.