Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/239/cron job for github activity script #241

Merged
merged 1 commit into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,10 @@ jobs:
chmod +x /home/admin/projectlab/app/profilesmigration.sh
echo "0 13 * * * /home/admin/projectlab/app/profilesmigration.sh" | crontab -

echo "*** Cron job to get github activity ****"
chmod +x /home/admin/projectlab/app/githubActivity.sh
echo "0 0 * * * /home/admin/projectlab/app/githubActivity.sh" | crontab -

echo "*** Step: *** Start pm2 service"
pm2 start ecosystem.config.js
pm2 save
Expand Down
4 changes: 4 additions & 0 deletions githubActivity.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
mkdir -p /home/admin/logs/githubjobs
LOGFILE="/home/admin/logs/githubjobs/projectsActivity-"$(date "+%Y%m%d%H%M%S")".log"
cd /home/admin/projectlab/app
npx ts-node --project ./ts-node.tsconfig.json ./tasks/GitHubDataManage/getGitHubActivityByProject.ts >> $LOGFILE