YourSites offers you the ability to check for updates on your client sites and also to check that the client sites are not down.
At present there is a single set of configuration options that control the frequency that this is done across all client sites. In future releases we may extend this to allow client site specific settings - if there is demand for this.
In the backend of YourSites - if you click the 'Options' button you can configure the scheduled tasks.
You need to set up one or more cronjobs to add actions to the queue and to process them.
In the screenshot above we are asking the server to check for Joomla and Extension updates once every 720 minutes (12 hours) and to check each client site is up once every 5 minutes. We will check 20 sites for Joomla updates, 10 sites for Extension updates (we set this lower since this typically takes longer to process) and 30 sites for sites being up (this is a fast/lightweight test so we can easily do 30 at a time.
Please note that the checks are done sequentially since PHP on Windows doesn't support forking. We may offer simultaneous checks in PHP on Unix/Linux down the line if there is demand.
Each time the cronjob is executed we complete 2 tasks.
If you have sites that are down or require updates you will be sent a notification email.
You set up cron to open 2 different webpages (replacing YOURSECRETKEY with the value you set in your config.
wget "https://YOURDOMAIN/index.php?option=com_yoursites&task=cron.addToCron&secretkey=YOURSECRETKEY"
and for a catch all processing cronjob
wget "https://YOURDOMAIN/index.php?option=com_yoursites&task=cron.processCron&secretkey=YOURSECRETKEY"
if you want specific action cronjobs you will want (available actions are checkcore, checkextensions, checksiteup, createbackups)
wget
"https://YOURDOMAIN/index.php?option=com_yoursites&task=cron.processCron&secretkey=YOURSECRETKEY&action=createbackups"
The addToCron page should be opened at least as often as the shortest interval you have configured above.
The processCron page should be opened as often as is needed to process the queue entries before its topped up by the addToCron task., In our case above we add site checks every 5 minutes and process them in batches of 30 so if we have 97 sites to process we will need 4 batches to be run every 5 minutes (97 / 30 rounded up to the nearest whole number) so we should set our processCron task to run once a minute.
If you want to run a simple combined cron job for everything then simply use
wget "https://YOURDOMAIN/index.php?option=com_yoursites&secretkey=YOURSECRETKEY"
YourSites adds a cli script to your Joomla /cli folder /cli/yoursites_cron.php - you should set this up to run with the same frequency as the processCron task described above. Pass your secret key as an argument to this script e.g.
php cli/yoursites_cron.php YOURSECRETKEY
or
php cli/yoursites_cron.php key=YOURSECRETKEY
You can specify actions using the action argument (available actions are checkcore, checkextensions, checksiteup, createbackups)
php cli/yoursites_cron.php key=YOURSECRETKEY action=createbackups
You can also separate out the adding to queue and processing queue as
php cli/yoursites_cron.php key=YOURSECRETKEY action=createbackups task=add
or
php cli/yoursites_cron.php key=YOURSECRETKEY action=createbackups task=process
We've added a helpful tool to the config pages to guide you on how often to run the cron jobs. See
click this for more information.
In both cases the you can configure YourSites so that the script checks that the machine that is running the cron/loading the cron webpage has the same IP address as the YourSites server itself or has a specific IP address. In other words you can configure the YourSites to only allow the script to run from specific machines. If you want to use a 3rd party cron service to run your cronjob for you you must relax this setting and rely on the 'secret key' to block "malicious" users from triggering your cronjob for you.
We love every single one of our users, without you YourSites simply couldn't happen! So we would love a review at the Joomla! JED so we can let others know about us too, please take a minute to write a review:
https://extensions.joomla.org/extension/yoursites-manager/
If you feel you have something negative to say, we would implore you to speak to us first, as we really really don't want anyone to be unhappy!