Skip to content

Instantly share code, notes, and snippets.

@georanma
Last active November 29, 2021 21:27
Show Gist options
  • Save georanma/fb396cd84ee614325454160d55ba0389 to your computer and use it in GitHub Desktop.
Save georanma/fb396cd84ee614325454160d55ba0389 to your computer and use it in GitHub Desktop.
use Carbon\Carbon;
// $start = Carbon::now()->subDays(30);
// $end = Carbon::now()->subDays(15);
$start = Carbon::createFromFormat('m-d-Y', '11-10-2021');
$end = Carbon::createFromFormat('m-d-Y', '11-19-2021');
$period = CarbonPeriod::since($start)->until($end);
$accounts = [1896639012498548, 1985512714220476, 3189634405969789, 4276831373018237];
foreach ($accounts as $account) {
foreach ($period as $date) {
$current = $date->format('m-d-Y');
Artisan::call("amazon-ads:get-sponsored-brands-report {$current} {$account} --fifteen-days-back");
echo $current . "done \n";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment