Skip to content

Instantly share code, notes, and snippets.

@minenwerfer
Last active May 7, 2024 12:11
Show Gist options
  • Save minenwerfer/ea1454bef3facbc829a3712e4eced9a4 to your computer and use it in GitHub Desktop.
Save minenwerfer/ea1454bef3facbc829a3712e4eced9a4 to your computer and use it in GitHub Desktop.
#!/bin/bash
function getSpan() {
year="$1"
month="$2"
dayMin="$3"
dayMax="$4"
date="$year-$month-$d"
for (( d=$dayMin; d<$dayMax; d++ )); do
date="$year-$month-$d"
for (( h=0; h<23; h++ )); do
date_min="$date-$h:00:00"
date_max="$date-$(( h+1 )):00:00"
echo "$date_min"
echo "$date_max"
curl "localhost:8000/lazy/ORDER_GENERATION/30000/order@get_exact_span/date_min=date:$date_min,date_max=date:$date_max,mapping=orderpaid,integration_id=62866b8b6ad140899ee308ca"
done
done
}
getSpan 2024 4 24 31
getSpan 2024 5 1 8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment