techstreat
Posts: 2
Joined: Sun Jun 05, 2016 6:32 pm

Start Program on boot, and every 30 minutes

Wed Sep 27, 2017 1:46 pm

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

Martin Frezman
Posts: 1020
Joined: Mon Oct 31, 2016 10:05 am

Re: Start Program on boot, and every 30 minutes

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...)
If this post appears in the wrong forums category, my apologies.

User avatar
DougieLawson
Posts: 36567
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Start Program on boot, and every 30 minutes

Wed Sep 27, 2017 4:14 pm

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.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Martin Frezman
Posts: 1020
Joined: Mon Oct 31, 2016 10:05 am

Re: Start Program on boot, and every 30 minutes

Wed Sep 27, 2017 4:25 pm

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.
If this post appears in the wrong forums category, my apologies.

techstreat
Posts: 2
Joined: Sun Jun 05, 2016 6:32 pm

Re: Start Program on boot, and every 30 minutes

Thu Sep 28, 2017 10:18 am

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

Return to “Beginners”