Skip to content
This repository has been archived by the owner on Apr 18, 2018. It is now read-only.

Support for cron expressions #3

Open
nestoru opened this issue Jan 13, 2017 · 0 comments
Open

Support for cron expressions #3

nestoru opened this issue Jan 13, 2017 · 0 comments

Comments

@nestoru
Copy link

nestoru commented Jan 13, 2017

It would be convenient to add support for cron expressions. To illustrate why let us consider the need to run a backup every hour for 7 years (not atypical for some Financial Services needs). We are forced to tag each instance 24 times:

scheduler:ebs-snapshot:prod:00	0000;2555;utc;all
scheduler:ebs-snapshot:prod:01	0100;2555;utc;all
scheduler:ebs-snapshot:prod:02	0200;2555;utc;all
scheduler:ebs-snapshot:prod:03	0300;2555;utc;all
scheduler:ebs-snapshot:prod:04	0400;2555;utc;all
scheduler:ebs-snapshot:prod:05	0500;2555;utc;all
scheduler:ebs-snapshot:prod:06	0600;2555;utc;all
scheduler:ebs-snapshot:prod:07	0700;2555;utc;all
scheduler:ebs-snapshot:prod:08	0800;2555;utc;all
scheduler:ebs-snapshot:prod:09	0900;2555;utc;all
scheduler:ebs-snapshot:prod:10	1000;2555;utc;all
scheduler:ebs-snapshot:prod:11	1100;2555;utc;all
scheduler:ebs-snapshot:prod:12	1200;2555;utc;all
scheduler:ebs-snapshot:prod:13	1300;2555;utc;all
scheduler:ebs-snapshot:prod:14	1400;2555;utc;all
scheduler:ebs-snapshot:prod:15	1500;2555;utc;all
scheduler:ebs-snapshot:prod:16	1600;2555;utc;all
scheduler:ebs-snapshot:prod:17	1700;2555;utc;all
scheduler:ebs-snapshot:prod:18	1800;2555;utc;all
scheduler:ebs-snapshot:prod:19	1900;2555;utc;all
scheduler:ebs-snapshot:prod:20	2000;2555;utc;all
scheduler:ebs-snapshot:prod:21	2100;2555;utc;all
scheduler:ebs-snapshot:prod:22	2200;2555;utc;all
scheduler:ebs-snapshot:prod:23	2300;2555;utc;all

We could tag just once. Considering the typical linux cron "m h dom mon dow":

scheduler:ebs-snapshot:prod	00 23 * * *;2555;utc

Note that the last "all" is not longer necessary. If there are spaces in the first value token it would mean it is a cron and only three tokens in total would be expected.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant