For repeating administration tasks (cache clean, recache) it is possible to use not only site server cron jobs but also external initiated cron jobs provided by EasyCron services. First choice for cron controlled runs is internal site server service (see Help for settings). But in cases when internal cron service is not provided (due to hosting limitations) or setting is difficult for site administrator then external initiated cron jobs are very welcome solution.
JotEasyCron plugin is additional plugin to JotCache extension which provides convinient solution for external cron jobs provided by EasyCron service.
JotEasyCron plugin is close tight to other parts of JotCache especially :
With JotEasyCron is possible to establish 4 different tracks which can be independent called by EasyCron service :
Common part for each track is setting of Secret Word which is basic security measure. Use random long alphanumeric string containing [a-zA-Z0-9_.-] characters for this purpose.
When you set Secret Word and click on Save button then you can see similar setup form :
with generated URLs for external cron run. For each track is available Yes/No switch which can enable/disable given operation.
For recache tracks is possible to define filter to narrow selection of pages which have to be recached. The filter definition is based on three parameters - Component (com), View (view), Content Id (id) as they are shown on JotCache Management View :
Structure of filter definition is following :
def1|def2|…|defx - partial definitions separated with character '|'
each partial definition can consist from assignments separated with comma ',' (strong remembers WHERE clause in database query) :
You can use also partial definition with 1 or 2 assignments.
In case when filter input box is empty then all cached pages shall be recached by next cron run.
On EasyCron site (https://www.easycron.com/) is necessary to register and then it is possible to create cron job :
For given JotEasyCron track copy External cron URL into 'URL to call' input on EasyCron - Create Cron Job form. Then select job interval in 'When to execute / Every' select box. Type descriptive name in Cron job name input and then is possible to finish with click on 'Create Cron Job' button.
Here is example of created EasyCron job :
Easiest way to check cron run is to use EasyCron Email Notification.
1. For cache clean run (track #1) in case of successfull run you get inside email message as :
JotCache clean cron job finished. xx expired items for cache storage deleted.
2. For cache recache run (tracks #2 up to #4) in case of successfull run you get inside email message as :
JotCache recache cron job finished successfully.
Details of recache run can be followed in recache log. The recache log can be enabled in JotCache component Options :
During recache run is recache log stored in Joomla logs directory under name jotcache.recache.log.php
Of course it is possible to check clean as well as recache operation also by observation of cached pages listed on JotCache component Management View page.