# Collection of CSV every week/month, on a specific day

**URL:** <https://community.influxdata.com/t/collection-of-csv-every-week-month-on-a-specific-day/27370>\
**Category:** Telegraf\
**Created:** [November 14, 2022, 9:01pm UTC](https://community.influxdata.com/t/collection-of-csv-every-week-month-on-a-specific-day/27370 "2022-11-14T21:01:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ricky99](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/ricky99/32/11420_2.png) [@Ricky99](https://community.influxdata.com/u/Ricky99)\
**Post date:** [November 14, 2022, 9:01pm UTC](https://community.influxdata.com/t/collection-of-csv-every-week-month-on-a-specific-day/27370/1 "2022-11-14T21:01:41Z")

</div>

Hello,  
I have two CSV files which are updated every week and every month with manual readings I do from some home devices (electricity and gas panels).  
The week’s CSV file is being updated approx on Monday, the month’s CSV file approx by the 7th of month.  
Is it possible to run the data collection by Telegraf on specific days (e.g. every Monday or every 7th of the month)?  
I would avoid to set the interval to 1d because of having flat results unusefully for many days.

Thanks you.  
Regards.

Riccardo

---

<div class="post-metadata">

**Author:** ![jpowers](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/jpowers/32/8569_2.png) [@jpowers](https://community.influxdata.com/u/jpowers)\
**Post date:** [November 14, 2022, 9:55pm UTC](https://community.influxdata.com/t/collection-of-csv-every-week-month-on-a-specific-day/27370/2 "2022-11-14T21:55:24Z")

</div>

If you know when the data will be around you have a couple options:

1. Use a cron job to execute telegraf with the `--once` option. This will just run one input or output cycle
2. Write your own script in a programming language of your choice to parse the data and send the data to InfluxDB using the client libraries instead.

Telegraf is a better agent versus something that is run once and a while, but it is possible.

---

<div class="post-metadata">

**Author:** ![Ricky99](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/ricky99/32/11420_2.png) [@Ricky99](https://community.influxdata.com/u/Ricky99)\
**Post date:** [November 14, 2022, 10:01pm UTC](https://community.influxdata.com/t/collection-of-csv-every-week-month-on-a-specific-day/27370/3 "2022-11-14T22:01:28Z")

</div>

Hello, thanks for your very fast reply.  
Solution at point 1. looks like interesting and probably the easier for me to build. I run Telegraf in a docker container so I am not sure I can setup a cron job and getting that persistent… Anyway, should I disable the Interval parameter in the Telegraf .conf file or does this lead to an error?  
Solution at point 2. is more difficult because of lack of experience and knowledge in code programming.

Thanks for now.

---

<div class="post-metadata">

**Author:** ![jpowers](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/jpowers/32/8569_2.png) [@jpowers](https://community.influxdata.com/u/jpowers)\
**Post date:** [November 14, 2022, 10:35pm UTC](https://community.influxdata.com/t/collection-of-csv-every-week-month-on-a-specific-day/27370/4 "2022-11-14T22:35:40Z")

</div>

> [@Ricky99](#):
>
> Solution at point 1. looks like interesting and probably the easier for me to build. I run Telegraf in a docker container so I am not sure I can setup a cron job and getting that persistent… Anyway, should I disable the Interval parameter in the Telegraf .conf file or does this lead to an error?

You don’t need an interval as it will be ignored anyway when using `--once`. Without the value specified, Telegraf will default to 10 seconds.
