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 3.1k 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.
    • lavolp3L Offline
      lavolp3 Module Developer @MajorC
      last edited by lavolp3

      @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 Reply Quote 0
      • M Offline
        MajorC Project Sponsor @lavolp3
        last edited by

        @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 Reply Quote 0
        • S Offline
          sdetweil @MajorC
          last edited by

          @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 Reply Quote 0
          • M Offline
            MajorC Project Sponsor @sdetweil
            last edited by

            @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 Reply Quote 0
            • S Offline
              sdetweil @MajorC
              last edited by

              @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 Offline
                sdetweil @MajorC
                last edited by

                @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 Reply Quote 0
                • M Offline
                  MajorC Project Sponsor @sdetweil
                  last edited by

                  @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 Reply Quote 0
                  • S Offline
                    sdetweil @MajorC
                    last edited by sdetweil

                    @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 Reply Quote 0
                    • M Offline
                      MajorC Project Sponsor @sdetweil
                      last edited by

                      @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 Reply Quote 0
                      • S Offline
                        sdetweil @MajorC
                        last edited by sdetweil

                        @MajorC yes.pm2 reruns regardless how the system was rebooted

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 1 / 2
                        • First post
                          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