Setup Models Auto Import
In one click, enable the models auto import feature. Models will be imported / updated every 5 minutes.
Auto-import needs a real cron
In order to update the availability of the webcam models (online/offline) every 5 minutes on your site, a cron task needs to be run frequently.
WordPress natively integrates a cron system. But this cron only starts when a visitor accesses a page of your site. This can be a problem when you start your site and have no traffic yet.
Fortunately it is possible to disable this cron and replace it with a real cron run by your server. This server cron will automatically launch the webcam models update script, even if there is nobody on your site.
How to setup a server cronjob
1. Disable WordPress native cron on your site
Edit your wp-config.php file and add this line:
Learn more about how to edit wp-config.php.
2. Setup the real cron on your server
- Log into you cPanel
- Go to Advanced section and click on Cron jobs
- Add a new Cron job
- Set the frequency as a “UNIX crontab” and paste the following command to run the cron every 2 minutes:
*/2 * * * *
- Set the task as “Execute a command” and paste this command (don’t forget to change https://yourdomain.com/ by your site url):
wget -q -O - https://yourdomain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1
WordPress.org get a nice tutorial about Hooking WP-Cron Into the System Task Scheduler.