# Curator Cronjob not running?

**URL:** https://discuss.elastic.co/t/curator-cronjob-not-running/139492
**Category:** Elasticsearch
**Created:** [July 11, 2018, 7:31am UTC](https://discuss.elastic.co/t/curator-cronjob-not-running/139492 "2018-07-11T07:31:43Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Tempy](https://avatars.discourse-cdn.com/v4/letter/t/898d66/32.png) [@Tempy](https://discuss.elastic.co/u/Tempy)
#### Post date: [July 11, 2018, 7:31am UTC](https://discuss.elastic.co/t/curator-cronjob-not-running/139492/1 "2018-07-11T07:31:43Z")

</div>

Hello,  
I configured Curator in /root/.curator/curator.yml and in the same path there is a action.yml where I configured actions to run (cretaing and deleting snapshots).  
With "sudo crontab -e" I creted a cronjob for Curator to run every night.  
`0 2 * * * curator --config ~/.curator/curator.yml ~/.curator/action.yml`  
Now I get an E-Mail from Cron Daemon which is saying "/bin/sh: 1: curator: not found".  
My guess is that it doesn't like the term "curator" without any path, yet the command works when using it in the shell. I am pretty sure, that I've read on another post, that putting it like this into Crontab should work.

Can you please help me out? 🙂

EDIT: I will try it with "/usr/local/bin/curator" and reply if that heped.

---

<div class="post-metadata">

### Author: ![akhileshsingh](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@akhileshsingh](https://discuss.elastic.co/u/akhileshsingh)
#### Post date: [July 11, 2018, 9:38am UTC](https://discuss.elastic.co/t/curator-cronjob-not-running/139492/2 "2018-07-11T09:38:22Z")

</div>

Hi @Tempy

I would request you to take output of the below steps and post it here for better understanding of your problem.

Step 1:  
`You are able to execute this action file from cli mode.`

Step 2:  
to check the crontab entries  
`crontab -l`

Step 3:  
`Also share your action file which you have configured for creating and deleting snapshot.`

Step 4:  
to check process running or not:  
`ps -ef | grep -n curator`

Step 5:  
to check curator service is running or not:  
`systemctl status avahi-daemon`

> [@Tempy](#):
>
> My guess is that it doesn't like the term "curator" without any path, yet the command works when using it in the shell. I am pretty sure, that I've read on another post, that putting it like this into Crontab should work.

`> Yes, it work like that only into crontab.`

Let me know if you have any issue on executing above steps.

Thanks.

---

<div class="post-metadata">

### Author: ![Tempy](https://avatars.discourse-cdn.com/v4/letter/t/898d66/32.png) [@Tempy](https://discuss.elastic.co/u/Tempy)
#### Post date: [July 11, 2018, 11:09am UTC](https://discuss.elastic.co/t/curator-cronjob-not-running/139492/3 "2018-07-11T11:09:41Z")

</div>

Using "/usr/local/bin/curator" instead of just "curator" was the right thing to do.  
The Cronjob now runs correctly.  
`0 2 * * * /usr/local/bin/curator --config ~/.curator/curator.yml ~/.curator/action.yml`

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [August 8, 2018, 11:09am UTC](https://discuss.elastic.co/t/curator-cronjob-not-running/139492/4 "2018-08-08T11:09:45Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
