# Running logstash through Cron to pull from salesforce

**URL:** <https://discuss.elastic.co/t/running-logstash-through-cron-to-pull-from-salesforce/164692>\
**Category:** Logstash\
**Created:** [January 17, 2019, 7:51pm UTC](https://discuss.elastic.co/t/running-logstash-through-cron-to-pull-from-salesforce/164692 "2019-01-17T19:51:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chandra0651](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chandra0651/32/30484_2.png) [@chandra0651](https://discuss.elastic.co/u/chandra0651)\
**Post date:** [January 17, 2019, 7:51pm UTC](https://discuss.elastic.co/t/running-logstash-through-cron-to-pull-from-salesforce/164692/1 "2019-01-17T19:51:17Z")

</div>

Hi,

My requirement is to pull the data from salesforce and output to elasticsearch. As the logstash donot have scheduler for Salesforce input plugin i am using the cron job to run the logstash for every 15 minutes. For first time the logstash is running fine but when the cron job is executed for second time i am getting below Error and cron job is not running.

```
[2019-01-17T14:50:12,706][FATAL][logstash.runner] Logstash could not be started because there is already another instance using the configured data directory. If you wish to run multiple instances, you must change the "path.data" setting.
[2019-01-17T14:50:12,709][ERROR][org.logstash.Logstash] java.lang.IllegalStateException: org.jruby.exceptions.RaiseException: (SystemExit) exit
```

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [January 17, 2019, 8:17pm UTC](https://discuss.elastic.co/t/running-logstash-through-cron-to-pull-from-salesforce/164692/2 "2019-01-17T20:17:19Z")

</div>

As far as I know, the only input that will stop logstash is the stdin input, which will cause logstash to exit when it hits EOF. You will need to kill logstash externally.

---

<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:** [February 14, 2019, 8:17pm UTC](https://discuss.elastic.co/t/running-logstash-through-cron-to-pull-from-salesforce/164692/3 "2019-02-14T20:17:21Z")

</div>

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