Page 1 of 1

Start Program on boot, and every 30 minutes

Posted: Wed Sep 27, 2017 1:46 pm
by techstreat
Hi
I have setup a DC++ hub using opendchub on raspberry pi for my college. Hub works just fine
I just wanted to know how to start the opendchub at boot??

@reboot command in crontab doesn't seem to work, then i read somewhere this is a known issue in debian, any workarounds??

Re: Start Program on boot, and every 30 minutes

Posted: Wed Sep 27, 2017 1:57 pm
by Martin Frezman
There really ought to be a sticky for this.

This question gets asked every few days. Searching the forum should get you lots of answers (some good, some not so good...)

Re: Start Program on boot, and every 30 minutes

Posted: Wed Sep 27, 2017 4:14 pm
by DougieLawson
You need to consider what happens if your machine boots at 29 minutes past or 1 minute to the hour and your program takes more than a minute to run. That will get messy. The running instance needs to hold a lock file for the duration of its processing or you'll get multiple instances running.

Also does your program have a GUI interface? Because starting GUI stuff from rc.local or crontab is a non-starter.

Re: Start Program on boot, and every 30 minutes

Posted: Wed Sep 27, 2017 4:25 pm
by Martin Frezman
Also does your program have a GUI interface? Because starting GUI stuff from rc.local or crontab is a non-starter.
Funny. I do both all the time.

It's easy when you know how.

Re: Start Program on boot, and every 30 minutes

Posted: Thu Sep 28, 2017 10:18 am
by techstreat
Martin Frezman wrote:
Wed Sep 27, 2017 1:57 pm
There really ought to be a sticky for this.

This question gets asked every few days. Searching the forum should get you lots of answers (some good, some not so good...)
Yeah i tried searching none seemed to work with opendchub, but none the less i got it working using crontab

Code: Select all

*/30 * * * * /usr/local/bin/opendchub