needless to say this does not work because admin.php is a password-protected back-end file so it cannot be called up without adding the password to the command. However even when you do add the password, the command still throws up an error.
I also tried simply calling up the link on the “Regenerate a sitemap” button (https://shop.mydomain.com/admin.php?dispatch=xmlsitemap.generate&storefront_id=1) using a curl command, but strangely that link will not generate a sitemap even if you are logged it. It only works when you actually click the button itself, not when you copy and paste the link.
If someone can help with a working cron command, I would be much obliged.
And then you will find it in var/files/google_sitemaps/COMPANY_NUMBER
The path will be specific to your instalation, replace the items I have capitilised and it may work, but even the starting path may have been changed from cpanel defaults and your hosting provider can provide assitane with path.
Thanks for that, I saw where the error was on my path and corrected it. The cron job now runs on terminal. However when I open the sitemap using https://MYDOMAIN/index.php?dispatch=xmlsitemap.view or https://MYDOMAIN/sitemap.xml it seems there is still the old data as shown by <lastmod.>2024-06-18<./lastmod>. which I assumed would be <.lastmod>2024-06-19<./lastmod>. What URL should I then put in the Google Search console so it gets the latest sitemap?
I managed to see that xml file. The file updates only when I use the “Regenerate a sitemap” button on the add-on, it doesn’t update when I run the cron job via Terminal. This is the output I am getting from Terminal: