[SOLVED] Cronjob on Sharedhosting

Hello,

I’m current having an issue with my instance of Kanboard. I’m using a shared-hosting, and Kanboard was installed using the Softaculous installation mode.

One issue that I noticed is that the Softaculous script creates a cronjob like mentioned in the documentation, but this is not working. I’ve tried to change the code of it (by adding php before cli otherwise I do get an error), but it still doesn’t work.

The weirdest part, is that if I open the cPanel’s terminal and I do paste the code of the cronjob, the automations set on the projects do work as expected.

The current code is: (I’ve replaced the user and domain here, for privacy reasons)

cd /home/<my_user>/<my.domain.com> && php cli cronjob >/dev/null 2>&1

I’ve reached out to the hosting support, and they told me that from their side the cronjob is working as expected.

Does anyone have any idea what might be the issue here?

Best regards!


Edit: This comment helped me to solve the issue. In my case, using /usr/local/bin/php /home/<my_user>/<my.domain>/cli cronjob >/dev/null 2>&1 worked.

I added an output to a log file and this seems to be the message:

Content-type: text/html; charset=UTF-8

This script run only from the command line