My Mautic version is: 2.15.2
My PHP version is: 7.2.19
My hosting provider’s cronjobs don’t support certain commands like writing cronjobs results to log files (they have their own modified version of cpanel). For example:
php /home/user/domain.com/public_html/mautic/app/console mautic:segments:update > /home/user/domain.com/public_html/mautic/segments_update.log 2>&1 gets me an error that some characters are not supported.
(If I just write php /home/user/domain.com/public_html/mautic/app/console mautic:segments:update everything is fine and the processes are running on mautic).
So their proposed workaround was to write a script for every cronjob and use it as a cronjob. So my scripts are:
The hosting provider says that the cronjobs/scripts are executed from their side.
(the output of cronjob is:
–2019-09-30 23:40:01-- https://domain.com/mautic/mautic_segments_update.sh Resolving domain.com (domain.com)… 2.57.89.23 Connecting to domain.com (domain.com)|2.57.89.23|:443… connected. HTTP request sent, awaiting response… 200 OK Length: 238 [application/x-sh] Saving to: â/dev/nullâ 0K 100% 38.1M=0s 2019-09-30 23:40:06 (38.1 MB/s) - â/dev/nullâ saved [238/238]
)
so they say the problem is with my scripts. Any ideas what’s wrong? Help needed
well, that’s what I was told to use in the command line to invoke the script… and from the output file support says it’s working from their side…
I didn’t plan to use crontab file but to use hosting providers interface for adding cronjobs (failed when I tried to ad logging ), then I tried to use script for that (failing up till now ) , so the third option could be to use crontab file as you say, and if that fails, to change provider who uses a normal cpanel…
Yes, scripts are executable, but if I’ll use crontab though, I don’t think I need to use my scripts? I’ll type the php commands directly to the crontab…
Not sure if I got that:
you mean to remove adding the log file ?
“/home/user/domain.com/public_html/mautic/Simo_cronjobs/my_cron_logs/segments_update.log 2>&1”
found the issue. Yes, the problem was with hosting support giving the wrong instructions to invoke the script and saying that everything is ok from their side… that says a lot about their support :…