I am trying to use the cron job to force a "button click" within admin. I can call the url, but of course it has a token attached for validation.
Want to do this so I can clear cache every night automatically than warm it up so its fresh everyday.
https://domain.com/admin/index.php?rout ... 0lSlr3ueXq
Is there a way for me to always accept a predefined token for this action?
Is there a way to adjust files so that particular url path does not require a token?
Any other ideas?
Want to do this so I can clear cache every night automatically than warm it up so its fresh everyday.
https://domain.com/admin/index.php?rout ... 0lSlr3ueXq
Is there a way for me to always accept a predefined token for this action?
Is there a way to adjust files so that particular url path does not require a token?
Any other ideas?
Just try to execute this URL in browser with and without token. If everything's OK, add a cron job.
Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com
Well, actually, this is normal, since you run this script from admin. A valid token is required for admin, so you can't run the script without it. You can't simulate button click either, because cron is server side.
The only thing you can do is move the script to "catalog" folder, edit it correspondingly and then run via cron.
The only thing you can do is move the script to "catalog" folder, edit it correspondingly and then run via cron.
Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com
Why would you do this? A good caching system should clear itself when new content is added.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Why nog add a cron that Will delete All files in a given folder.
Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Alle niet stekplichtige onderdelen zoals scharnieren, sloten, randverwarming en verlichting voor alle typen koelingen en vriezers.
https://koelcel-onderdelen.com
I think I finally have to at least try this out... we run multistore and unless cache gets cleared for all stores on a regular basis it seems that we have cart issues. will let you know how it goes.thekrotek wrote: ↑Thu Feb 22, 2018 1:54 pmWell, actually, this is normal, since you run this script from admin. A valid token is required for admin, so you can't run the script without it. You can't simulate button click either, because cron is server side.
The only thing you can do is move the script to "catalog" folder, edit it correspondingly and then run via cron.
Who is online
Users browsing this forum: Baidu [Spider], Semrush [Bot] and 14 guests