Since Joomla 4 there is a change in the way cron commands are processed, this can lead to a Could not parse the requested URI error with the cron job setup as explained in Setting up a cron job in RO CSVI. This document explains a possible workaround on how to run a cron job using a bash script.
- Create a bash script file in your site root folder (here the location is /home/domain/public_html/) or a location you want to set in cron command. Say the bash script file name is cron-map.sh
- Open cron-map.sh file and add the below contents
/usr/local/bin/php cron.php --key="mysecretword" --template_id="123"
- Now in your control panel you can set the cron command as
1. Replace /home/domain/public_html/ to your site folder path
2. Replace mysecretword with template secret key as set in cron template
3. Replace 123 to template ID as per cron template