0

I am trying to get Redis to start every time my system reboots to make sure that the cache are availables to my webserver. What I did is that inserted the following line in my crontab:

@reboot redis-server /path/to/redis.conf

After rebooting my system, the cron logs indicate that the cronjob has run:

Aug 15 01:10:59 hostname cron[1097]: (CRON) INFO (Running @reboot jobs)
Aug 15 01:10:59 hostname CRON[1176]: (regis) CMD (redis-server /path/to/redis.conf)

However, the redis server is not running, and that's my problem. Note that the redis server starts just fine whenever I run the command line in bash.

What am I doing wrong?

Régis B.
  • 193
  • 2
  • 13

1 Answers1

2

I managed to solve this issue by giving the full path to redis-server to cron. The crontab now looks like this:

@reboot /usr/local/bin/redis-server /path/to/redis.conf
Régis B.
  • 193
  • 2
  • 13