• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Dropbox-Uploader: how to synchronize a folder with cron job?

Scheduled Pinned Locked Moved Troubleshooting
11 Posts 3 Posters 2.6k Views 3 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    MajorC Project Sponsor
    last edited by Oct 7, 2020, 6:45 PM

    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

    L 1 Reply Last reply Oct 7, 2020, 8:26 PM Reply Quote 0
    • L Offline
      lavolp3 Module Developer @MajorC
      last edited by lavolp3 Oct 7, 2020, 8:26 PM Oct 7, 2020, 8:26 PM

      @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.

      How to troubleshoot modules
      MMM-soccer v2, MMM-AVStock

      M 1 Reply Last reply Oct 7, 2020, 8:34 PM Reply Quote 0
      • M Offline
        MajorC Project Sponsor @lavolp3
        last edited by Oct 7, 2020, 8:34 PM

        @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.

        S 1 Reply Last reply Oct 7, 2020, 8:36 PM Reply Quote 0
        • S Away
          sdetweil @MajorC
          last edited by Oct 7, 2020, 8:36 PM

          @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

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          M 1 Reply Last reply Oct 9, 2020, 3:28 PM Reply Quote 0
          • M Offline
            MajorC Project Sponsor @sdetweil
            last edited by Oct 9, 2020, 3:28 PM

            @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?!?

            S 2 Replies Last reply Oct 9, 2020, 3:31 PM Reply Quote 0
            • S Away
              sdetweil @MajorC
              last edited by Oct 9, 2020, 3:31 PM

              @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

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • S Away
                sdetweil @MajorC
                last edited by Oct 9, 2020, 3:34 PM

                @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.

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                M 1 Reply Last reply Oct 9, 2020, 3:35 PM Reply Quote 0
                • M Offline
                  MajorC Project Sponsor @sdetweil
                  last edited by Oct 9, 2020, 3:35 PM

                  @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.

                  S 1 Reply Last reply Oct 9, 2020, 3:36 PM Reply Quote 0
                  • S Away
                    sdetweil @MajorC
                    last edited by sdetweil Oct 9, 2020, 3:37 PM Oct 9, 2020, 3:36 PM

                    @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)

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    M 1 Reply Last reply Oct 9, 2020, 6:17 PM Reply Quote 0
                    • M Offline
                      MajorC Project Sponsor @sdetweil
                      last edited by Oct 9, 2020, 6:17 PM

                      @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?

                      S 1 Reply Last reply Oct 9, 2020, 6:26 PM Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        1/11
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy