Bitbar: Use time instead of a refresh rate

Created on 3 Feb 2016  ·  3Comments  ·  Source: matryer/bitbar

Would it be possible to use an absolute time rather than a refresh rate?

E.g. having _myplugin.00:00.sh_ rather than _myplugin.10s.sh_ so that a date-based plugin only refreshes once a day.

→? future maybe

Most helpful comment

👍 + it would be handy to allow recurring absolute times also.

Example use case for me is my solar inverter updates every 15 minutes on a schedule: 08:00 08:15 08:30 and so on. So I would like to refresh slightly after that time.

Could allowing a cron expression work? (perhaps within the plugin file)
In my case 01,16,31,46 * * * * would do nicely.

Something like this.

Filename:

myplugin.custom.sh

Contents:

#!/usr/bin/python
...
<bitbar.custom_schedule>01,16,31,46 * * * *</bitbar.custom_schedule>
...

All 3 comments

Nice idea. I think BitBar's scheduling needs evolving in order to support this. Right now, it's not possible. Although you could set the refresh rate to 1 minute and just do a quick time check in your script as a workaround?

👍 + it would be handy to allow recurring absolute times also.

Example use case for me is my solar inverter updates every 15 minutes on a schedule: 08:00 08:15 08:30 and so on. So I would like to refresh slightly after that time.

Could allowing a cron expression work? (perhaps within the plugin file)
In my case 01,16,31,46 * * * * would do nicely.

Something like this.

Filename:

myplugin.custom.sh

Contents:

#!/usr/bin/python
...
<bitbar.custom_schedule>01,16,31,46 * * * *</bitbar.custom_schedule>
...

I like these ideas.

>

Was this page helpful?
0 / 5 - 0 ratings

Related issues

insiderq picture insiderq  ·  10Comments

BigPrimeNumbers picture BigPrimeNumbers  ·  4Comments

JayBrown picture JayBrown  ·  11Comments

javray picture javray  ·  11Comments

fenhl picture fenhl  ·  4Comments