Post by swisslink » Thu Feb 22, 2018 4:25 am

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?

New member

Posts

Joined
Tue Dec 08, 2015 4:40 am

Post by thekrotek » Thu Feb 22, 2018 4:56 am

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


User avatar
Active Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by swisslink » Thu Feb 22, 2018 6:17 am

when executed from browser it just jumps to admin login

New member

Posts

Joined
Tue Dec 08, 2015 4:40 am

Post by thekrotek » Thu Feb 22, 2018 1:54 pm

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.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Active Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by paulfeakins » Thu Feb 22, 2018 6:51 pm

swisslink wrote:
Thu Feb 22, 2018 4:25 am
I can clear cache every night automatically than warm it up so its fresh everyday.
Why would you do this? A good caching system should clear itself when new content is added.

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Active Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom

Post by victorj » Thu Feb 22, 2018 9:10 pm

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

Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Eigen productie en snelle levering.
https://123-deurrubbers.com


User avatar
Expert Member
Online

Posts

Joined
Sat Jun 25, 2011 4:09 am
Location - Alkmaar Holland
Who is online

Users browsing this forum: No registered users and 20 guests