Skip to content

Commit

Permalink
Add method to update checked file
Browse files Browse the repository at this point in the history
  • Loading branch information
matsuoshi committed Jan 21, 2024
1 parent b5309c2 commit 9bc1c67
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [ master, v1.1, build-test ]
schedule:
- cron: '19 19 */3 * *'
- cron: '40 20 * * *'

jobs:
build:
Expand Down
8 changes: 8 additions & 0 deletions app/holidaysJP.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ public function generate()
foreach ($yearly as $year => $ary) {
$this->generate_api_file($ary, $year);
}

$this->updateCheckedFile();
}

/**
Expand Down Expand Up @@ -165,4 +167,10 @@ protected function output_csv_file($filename, $data)
}
fclose($fp);
}

protected function updateCheckedFile()
{
$checkedFile = self::DIST . '/checked_at.txt';
file_put_contents($checkedFile, date('Y-m-d H:i:s'));
}
}

0 comments on commit 9bc1c67

Please sign in to comment.