Read the statement by Michael Teeuw here.
Dropbox-Uploader: how to synchronize a folder with cron job?
-
@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 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?
-
@MajorC yes.pm2 reruns regardless how the system was rebooted