Skip to content

Instantly share code, notes, and snippets.

@kilfu0701
Last active July 10, 2020 02:08
Show Gist options
  • Save kilfu0701/6ed865d17eb6e29c30a9a84190642d5a to your computer and use it in GitHub Desktop.
Save kilfu0701/6ed865d17eb6e29c30a9a84190642d5a to your computer and use it in GitHub Desktop.
Execute in a date range & each day.
#!/bin/bash
d="2020-01-01"
until [[ $d > 2020-05-01 ]]; do
p=`echo $d | sed -e 's/-//g'`
/home/work/php7.3.2/bin/php /path/to/project/artisan generate:report Log1 "$p"
/home/work/php7.3.2/bin/php /path/to/project/artisan generate:report Log2 "$p"
/home/work/php7.3.2/bin/php /path/to/project/artisan generate:report Log3 "$p"
d=$(date -I -d "$d + 1 day")
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment