1. Picannick
  2. RO CSVI
  3. Tuesday, 21 January 2025
  4.  Subscribe via email
Hi there,

we are using a cron job to export a XML for Google Merchant once a day.
Until now (used with Joomla 3) we created a cron job (CLI) on our server with the following parameters.

/htdocs/administrator/components/com_csvi/helper/cron.php -- --key="mysecretkey" --template_id="1"

Now we migrated the site to Joomla 5 and I want to use sheduled task so that I only need one cron job on the server which triggers all sheduled tasks.
But I am a little helpless on how to set up the task.

I wanted to use the GET request. I have read that the cron job now works a little different.
Can I just put the following command into the URL field of the GET task?

https://www.domain.de/cli/joomla.php rocsvi:export --template_id=1 --key=mysecretkey

Or do I need to use something else?

Kind regards,
Tanja
Accepted Answer Pending Moderation
Hi Tanja,

I have read that the cron job now works a little different.
In Joomla 5 we have proper cron jobs that run via the Command Line Interface, hence the name of the folder in joomla is cli. So all cronjobs can be triggered via the Joomla CLI instead of every extension having their own way of doing things, there is now a uniform way of triggering cronjobs.

The new cron command does not work via the URL, the Joomla cron only runs via CLI just like the old cron does not work via the web browser. The only way I can think of is that you create a menu item for the template you want to run and point your scheduled task to the URL of the menu item. That at least works for me. Be aware, anything that runs longer than 30 seconds is most likely going to be terminated by the server. As this is not a real cron and therefore called the Poor Mans Cron :D

RO CSVI has not been tested with the Scheduled Tasks in Joomla as most users schedule cronjobs via the control panel of their hosting provider or directly in the crontab of the server.

Let me know if that helps.
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 1
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!