Last active
August 29, 2015 14:13
-
-
Save jgoulah/43632bd67fbb8be326c6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| function check { | |
| when=$(date --date="$1 15:00" --utc) | |
| echo -n "$when: " | |
| # run design mixer every other monday starting from jan 5 2015 | |
| ((($(date +%s --date="$when") + 259200) / 86400 % 14)) && echo run || echo skip | |
| # run manager mixer every other monday starting from jan 12 2015 | |
| #((($(date +%s --date="$when") + 864000) / 86400 % 14)) && echo run || echo skip | |
| } | |
| for start in "2015-01-05"; do | |
| for x in $(seq 0 24); do | |
| check "$start + $(($x * 7)) days" | |
| done | |
| echo | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment