webcam plugin Cron job

Post Reply
proger
Observer
Observer
Posts: 35
Joined: Tue Jan 16, 2018 4:52 pm
Location: Norway
Station model: davis vantage vue
Software: Meteobridge
Contact:

webcam plugin Cron job

Post by proger » Sat Mar 03, 2018 8:29 pm

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
Image

User avatar
dmgould
Forecaster
Forecaster
Posts: 173
Joined: Sat Aug 26, 2017 2:43 am
Location: Divide, Colorado, USA
Station model: Davis Pro 2 Plus Wireless
Software: Meteobridge
Contact:

Re: webcam plugin Cron job

Post by dmgould » Sat Mar 03, 2018 9:11 pm

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
Last edited by dmgould on Sun Mar 04, 2018 2:36 pm, edited 1 time in total.
Dave G
Image

proger
Observer
Observer
Posts: 35
Joined: Tue Jan 16, 2018 4:52 pm
Location: Norway
Station model: davis vantage vue
Software: Meteobridge
Contact:

Re: webcam plugin Cron job

Post by proger » Sun Mar 04, 2018 7:11 am

thank you very much

I Will give this a try
Think I understand it now
Image

User avatar
Dehatter
Professional
Professional
Posts: 350
Joined: Sun Jan 07, 2018 5:11 am
Location: Matthews, NC, USA
Station model: Ecowitt WH80
Software: Ecowitt GW1000
Contact:

Re: webcam plugin Cron job

Post by Dehatter » Sun Mar 04, 2018 9:53 pm

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 7085 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 7084 times
The cron job runs all the update php's that are located in the cron folder.

Good luck!

Tom
Image

proger
Observer
Observer
Posts: 35
Joined: Tue Jan 16, 2018 4:52 pm
Location: Norway
Station model: davis vantage vue
Software: Meteobridge
Contact:

Re: webcam plugin Cron job

Post by proger » Wed Mar 07, 2018 8:35 am

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
Image

Post Reply