Skip to content

Commit

Permalink
Merge pull request #7 from ebmdatalab/deploy
Browse files Browse the repository at this point in the history
Add cron job
  • Loading branch information
ccunningham101 committed Jan 9, 2024
2 parents f7f8b8c + 6ee9936 commit 444e4e8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
11 changes: 11 additions & 0 deletions DEVELOPERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,17 @@ increased to double.
just run send_retraction_emails --live-run --limit=200 -v 3
```

#### Retrieve mailgun events

Set up a cronjob so that mailgun logs will be added to the database every day.
Mailgun logs are stored for a few days, but in case the server is down, we do
not want to skip a day.

This would get the logs once a day at 4am
```sh
00 04 * * * /home/retractobot-project/retractobot/deploy/get_mailgun_events.sh
```

## After the trial
Once the follow-up time has ended

Expand Down
6 changes: 6 additions & 0 deletions deploy/get_mailgun_events.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

cd /home/retractobot-project/retractobot
# Add just to the path
export PATH="$PATH:/home/retractobot-project/bin"
just run retrieve_mailgun_events -v 1

0 comments on commit 444e4e8

Please sign in to comment.