Skip to content

Commit

Permalink
Merge pull request #241 from wizeline/feat/239/project-activity-cronjob
Browse files Browse the repository at this point in the history
feat/239/cron job for github activity script
  • Loading branch information
martinrobled0 authored Oct 12, 2023
2 parents e9a7484 + 13312ab commit 4ecc0a1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
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

0 comments on commit 4ecc0a1

Please sign in to comment.