Read the statement by Michael Teeuw here.
Dropbox-Uploader: how to synchronize a folder with cron job?
-
Hi,
I would like to synchronize a Dropbox folder with pictures to my RPI, so I can use the pictures as MM background.
I used https://github.com/andreafabrizi/Dropbox-Uploader
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.
Thanks
-
@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
pm2 save -
@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 automaticallyso, 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 saveto 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?
-
@MajorC yes.pm2 reruns regardless how the system was rebooted
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login