Created
March 18, 2016 20:20
-
-
Save tym-xqo/36fe4cc2f3b186f9ca08 to your computer and use it in GitHub Desktop.
loop-by-date.sh
This file contains 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 | |
last="2016-02-23" | |
first="2015-12-31" | |
i=1 | |
while [[ $last > $first ]]; do | |
this=$(date -I -d "$last - 3 days") | |
printf -v j "%02d" $i | |
luigi --module=etl_scripts.dfp_ad_unit_viewable DFPAdUnitViewableByNetwork --report-name="auv_backfill$j" --period="$this-$last" --workers=12 | |
last=$(date -I -d "$this - 1 day") | |
(( i++ )) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment