Page 1 of 1

webcam plugin Cron job

Posted: Sat Mar 03, 2018 8:29 pm
by proger
taken from the manual of the plugin

2. if you do not have any scripts in the crons directory yet, then simply put the updateWebcam there and set a CRON job for the load/cron.php. Make sure you also include your update password, so the URL will look something like this:
TEMPLATE_ROOT/load/cron.php?password=YOUR_UPDATE_PASSWORD
The CRON interval depends on what you specified in the setup, how often you want the image to be saved in the database. If for example you set every 15 minutes, then to make sure, just set your CRON to 14 minutes or lower, etc.

I am all new to the cron job thing so dont understand this at all.
Can anyone tell me more on how to set a cron job for the load/cron.php ?
Where do I set interval in minutes to the cron?

Thanks in advance

Re: webcam plugin Cron job

Posted: Sat Mar 03, 2018 9:11 pm
by dmgould
You didn't list any information about your setup, but looking at your profile it appears you are using Meteobridge. If that is correct you can setup an http function to trigger cron.php. Set that up under the Services tab on your Meteobridge. That basically is your cron job since your Meteobridge triggers cron.php on whatever schedule you setup on it.

It would look like this. The interval you set should be less than the update time you have set to load your webcam pictures to the database.

http://TEMPLATE_ROOT/load/cron.php?password=YOUR_UPDATE_PASSWORD

Re: webcam plugin Cron job

Posted: Sun Mar 04, 2018 7:11 am
by proger
thank you very much

I Will give this a try
Think I understand it now

Re: webcam plugin Cron job

Posted: Sun Mar 04, 2018 9:53 pm
by Dehatter
You can aslo use https://cron-job.org

There you can setup a free cron job that runs at your preset interval.''

Mine looks like this...
cron.jpg
cron.jpg (149.63 KiB) Viewed 7265 times

There are 2 reasons I don't use my MB for this.
1 (small factor) One less thing to run off the MB
2(large factor) I get an email when it does not run (see email options in the example).

Either way, just make sure the update phps are in the cron folder.

Mine looks like this:
Update.jpg
Update.jpg (77.18 KiB) Viewed 7264 times
The cron job runs all the update php's that are located in the cron folder.

Good luck!

Tom

Re: webcam plugin Cron job

Posted: Wed Mar 07, 2018 8:35 am
by proger
Thanks for the info

for now i have set up mb for the job.
Think this is also a good way of doing it.

Will defenetly look into this method