Dropbox-Uploader: how to synchronize a folder with cron job?
I would like to synchronize a Dropbox folder with pictures to my RPI, so I can use the pictures as MM background.
Within some time, I managed to download one file to the default folder from my dropbox to the RPI. But I have no idea how to do this as a cron job once an hour.
Any help is highly appreciated.
@MajorC why dont you regularly download the whole folder and select files from that to show as background.
I assume with the Download Option of the script you might be able to kind of synchronise your folder.
@lavolp3 I am able to download the folder. But I would like to have a script to do that every time the pi starts up automatically. That’s where I am having the problem at the moment.
@MajorC which part of the ‘when the pi boots’ are u having trouble with
if you use pm2, you can start your script with pm2
pm2 start scriptpath
@sdetweil can you give me a little bit more details? I am quite new to the MM-world and have no idea where I can find what you wrote?!?
@MajorC YOU have to enter those commands
you said you have a script that will download files
now, turn it into something that happens every hour, add a while loop around it…
(I know you don’t know, so google searching will teach you a ton)
then, once THAT works, you can use the pm2 process manager to launch it for you
@MajorC you said
But I would like to have a script to do that every time the pi starts up automatically
so, what commands would you issue to do that
creating a script is as simple as writing a file with this commands
making it executable (see chmod command)
and then launching it.
@sdetweil the script is running fine if I start it manualy by hand.
I need a hint how to do it the same way, the MagicMirror starts.
@MajorC i wrote the two commands u need to issue
pm2 start scriptpath (where is your script and what is its name, = scriptpath) pm2 save
to set it up if you use pm2 to launch MM (which my install script does for you if you used it)
@sdetweil thank you. It seams to work. The script was way more easy than expected.
May I ask, if I roboot the MM with Strg+Q, will my script run again?