Hi Everyone !
I am unable to make the plugin work properly, there is something I don't understand, or that I am doing wrong. So I need your help !!!!
1. Upload the files in my plugin directory --> done
2. Set up the plugin in my control panel --> done
3. Move the updateWebcam.php file into the load/crons folder --> done
4. Launch the Cronjob at the address /template/load/cron.php?password=***** --> done
I think it executes correctly, because I have an answer on the webpage. A image is saved, a thumbnail is created, as well as the table and everything.
But.... that's all ! No additional image is saved. Looks like the cronjob is running only manually and not on a regular basis. Images are saved only when I connect to /template/load/cron.php?password=*****
So I think something is missing, or wrong. I have tried to change the plugin settings, or to have a look in the file, but I don't have the knowledge.
Would be happy to have some assistance !
Thank you !!
WEBCAM plugin & CRONJOB
-
proger
- Observer

- Posts: 35
- Joined: Tue Jan 16, 2018 4:52 pm
- Location: Norway
- Station model: davis vantage vue
- Software: Meteobridge
- Contact:
Re: WEBCAM plugin & CRONJOB
I made a folder where I store photos downloaded from webcam.
In here I have a script that rename every snap photo my webcam uploads to the folder
The name on the file has to be the same as in settings on the plugin
Here is the script you can use for renaming the photo
<?php
$fileList = glob('*.jpg');
var_dump($fileList);
foreach (glob("put in folder name here/*.jpg") as $filename) {
echo "Renaming " . $filename . " now.</br>";
if(file_exists($filename)) {
rename($filename, "name of your photo here" . ".jpg");
echo $filename . " is now name og photo" . ".jpg</br>";
In here I have a script that rename every snap photo my webcam uploads to the folder
The name on the file has to be the same as in settings on the plugin
Here is the script you can use for renaming the photo
<?php
$fileList = glob('*.jpg');
var_dump($fileList);
foreach (glob("put in folder name here/*.jpg") as $filename) {
echo "Renaming " . $filename . " now.</br>";
if(file_exists($filename)) {
rename($filename, "name of your photo here" . ".jpg");
echo $filename . " is now name og photo" . ".jpg</br>";
-
Lespius
- Advisor

- Posts: 61
- Joined: Wed Aug 23, 2017 7:32 pm
- Location: Cugy, Switzerland
- Station model: Davis VP2
- Software: Meteobridge
- Contact:
Re: WEBCAM plugin & CRONJOB // SOLVED
Solved !!
I discovered that I needed to create a cron-job, and I did one on cron-job.org, thanks to viewtopic.php?f=60&t=1247&p=5843#p5843.
And now it works perfectly fine !
Thank you Proger for your answer, even if it was not my problem. But I must say that I had previously a problem with the FTP upload from my IPCam, because the name of the file has a timestamp. So your script could be interesting for that.
I discovered that I needed to create a cron-job, and I did one on cron-job.org, thanks to viewtopic.php?f=60&t=1247&p=5843#p5843.
And now it works perfectly fine !
Thank you Proger for your answer, even if it was not my problem. But I must say that I had previously a problem with the FTP upload from my IPCam, because the name of the file has a timestamp. So your script could be interesting for that.
- Dehatter
- 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 & CRONJOB
how are you running the cron job?
Are you using a service?
I suggest https://cron-job.org as it is simple, free, and notifies you if it fails.
Tom
Are you using a service?
I suggest https://cron-job.org as it is simple, free, and notifies you if it fails.
Tom
-
Lespius
- Advisor

- Posts: 61
- Joined: Wed Aug 23, 2017 7:32 pm
- Location: Cugy, Switzerland
- Station model: Davis VP2
- Software: Meteobridge
- Contact:
Re: WEBCAM plugin & CRONJOB
Absolutely. I have found this site in one of your post. Dramatically simple, all is working perfectly !!
Check http://www.meteo-cugy.ch/template/plugi ... /index.php
so coooool
Check http://www.meteo-cugy.ch/template/plugi ... /index.php
so coooool