# Cron in elastic.co to exec a Node.js script?

**URL:** <https://discuss.elastic.co/t/cron-in-elastic-co-to-exec-a-node-js-script/218815>\
**Category:** Elasticsearch\
**Created:** [February 11, 2020, 4:05pm UTC](https://discuss.elastic.co/t/cron-in-elastic-co-to-exec-a-node-js-script/218815 "2020-02-11T16:05:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zoomi4he](https://avatars.discourse-cdn.com/v4/letter/z/58f4c7/32.png) [@Zoomi4he](https://discuss.elastic.co/u/Zoomi4he)\
**Post date:** [February 11, 2020, 4:05pm UTC](https://discuss.elastic.co/t/cron-in-elastic-co-to-exec-a-node-js-script/218815/1 "2020-02-11T16:05:55Z")

</div>

Using my elastic,co deployment, how can I run a node.js script every minute and collect the execution time for the script? I'd like to collect time series data on the scripts execution time and get alerts when it takes longer than normal.

I don't want to setup a compute resource out of band from my [elastic.co](http://elastic.co) deployment and monitor it with my [elastic.co](http://elastic.co) deployment. I want my [elastic.co](http://elastic.co) deployment to run the script and collect and monitor the data.

---

<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:** [March 10, 2020, 4:06pm UTC](https://discuss.elastic.co/t/cron-in-elastic-co-to-exec-a-node-js-script/218815/2 "2020-03-10T16:06:11Z")

</div>

Closed on March 10, 2020, 4:06pm UTC

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