Is it possible to run a telegraf agent so that the interval changes on time of day etc?

Is it possible to adjust how the agent interval is set based on time of day or day of week. So for instance on Mon-Friday run an input once every minute between 9-5 and in off hours once every 5 minutes?

Probably not available right out of the box, but is it something that can be hacked up?

Thanks!

If you have that specific of a run schedule I highly recommend using cron or something similar to call telegraf with the --once option.

Thanks for that -once pointer, that does it for me. I have a fork of your init.sh that runs a shell script which has its own scheduler based on bash while && sleep command. This will work perfectly.

So I have a rule now that runs on mon-friday 0900-1700 where telegraf runs once a minute and in all other times once every 5 minutes.