I've setup my Raspberry Pi (running the latest Rasbpian) to use Andrea Fabrigzi's Dropbox Uploader (https://github.com/andreafabrizi/Dropbox-Uploader). In using this I've aimed to be able to download files from a folder on my Dropbox account and onto a USB device mounted on my Pi. Now all this works however I've been unable to get this running on START UP. I've made a simple script that is as follows;

/home/pi/Dropbox-Uploader/dropbox_uploader.sh download /testFolder /home/pi/usbdrv

This script runs perfectly well (I've made it an executable through chmod +x), however when I attempt to get it running on startup it does absolutely nothing. I've tried rc.local, init.d, crontab and a few others that I can't remember off the top of my head. Any help would be very, very appreciated, thank you.

  • 1
    May it fail due to an early start before udev to mount the usb drive? – vaha Oct 24 '16 at 8:01
  • Can you tell how did you make your crontab entry. I will suggest an answer below tell me if it works. – Varad A G Oct 25 '16 at 1:56

You can use @reboot option in crontab to start a script on reboot. I have found this easiest way of scheduling.

Below are the steps:

Step 1: Open the crontab using command sudo crontab -e
Step 2: @reboot /home/pi/Dropbox-Uploader/dropbox_uploader.sh download /testFolder /home/pi/usbdrv 1>/dev/null 2>&1

I have my cron working fine at reboot and config looks like below. Just for your reference.

# indicating with different fields when the task will be run
# and what command to run for the task
# To define the time you can provide concrete values for
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
# at 5 a.m every week with:
# m h  dom mon dow   command
@reboot python /home/pi/utils/dateDisplay.py 1>/dev/null 2>&1

Your Answer

