Cron – Create a cron job to run redis every 30 minutes if it is not running

cronredis

I want to create a cron job that will run redis every 30 minutes if it is not already running, but I don't know what I should do.

I know that the beginning should look like this */30 * * * */<some path to redis-server file>.

I want to create this cron job because its get a little tedious running redis via ./redis-server every time it crashes.

I figured out it was crashing because my memory usage was a bit over the limit. Thanks for your help.

Best Answer

  1. Redis shouldn't be crashing. I'd focus on that first. Is it running out of RAM?
  2. Use something like Supervisor or Monit, or run Redis through something like Upstart.
Related Topic