Arthur
Arthur

Reputation: 2110

Start sidekiq automatically on OSX

I have coded up a small ruby gem that I use on my laptop to check disk space and other things.

I am using a sidekiq worker that runs periodically and emails me status updates.

I was wondering how to make a sidekiq worker run automatically after I restart OSX? Is this possible?

Cheers

Upvotes: 0

Views: 4641

Answers (2)

Touseef Murtaza
Touseef Murtaza

Reputation: 1956

Launch Redis on computer (Mac) starts.

ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents

Edit redis-server /usr/local/etc/redis.conf and set daemonize yes

After you saved file with this change just start server:

src/redis-server

Upvotes: 0

Muntasim
Muntasim

Reputation: 6786

To run sidekiq you need to run: bundle exec sidekiq. If you want to run this on startup then you can follow these steps:

  1. Start Automator.app;
  2. Select "Application";
  3. Click "Show library" in the toolbar (if hidden);
  4. Add "Run shell script" (from the Actions/Utilities);
  5. Add script 'bundle exec sidekiq Or cd YOUR_APP_PATH&&bundle exec sidekiq;
  6. Test it;
  7. Save it somewhere: a file called your_name.app will be created);
  8. Go to System Preferences → Accounts → Login items;

More startup script options are here

Upvotes: 4

Related Questions