Fulfill a cron job using Express Custom Server with Next.js.
- timeSignalService
- Send slack notification once an hour.
- youtubeService
- Add new videos of channels registered in a specific playlist at morning.
- githubGrassService
- At the end of the day you will be notified of the number of contributions for today.
- Notifies me of the report once a week.
- qiitaTrendService
- Notify qiita articles on a particular topic once every 20 minutes.
- Clone and install
$ git clone https://github.com/itizawa/next-cron.git
$ cd next-cron
$ yarn
-
Prepare environment variables see below for setting values.
-
Starting
$ yarn dev
Variable | Description | Default | Required |
---|---|---|---|
WEBHOOK_URL | required for slack notification | ✅ |
Variable | Description | Default | Required |
---|---|---|---|
ENABLE_TIME_SIGNAL | whether to enable time signal service | false | |
CHANNEL_FOR_TIME_SIGNAL | notification channel for time signal service | #general |
Variable | Description | Default | Required |
---|---|---|---|
ENABLE_YOUTUBE | whether to enable youtube service | false | |
YOUTUBE_PLAYLIST_ID | target playlist to add | ✅ | |
CHANNEL_FOR_YOUTUBE | notification channel for youtube service | #general | |
YOUTUBE_API_KEY | apikey | ✅ | |
YOUTUBE_CLIENT_ID | client id | ✅ | |
YOUTUBE_CLIENT_SECRET | client secret | ✅ | |
YOUTUBE_REFRESH_TOKEN | refresh token | ✅ |
Get each setting value by accessing here https://console.cloud.google.com/
Variable | Description | Default | Required |
---|---|---|---|
ENABLE_GITHUB_GRASS | whether to enable github grass service | false | |
CHANNEL_FOR_GITHUB_GRASS | notification channel for youtube service | #general | |
GITHUB_USERNAME | target users to get data | ✅ |
Variable | Description | Default | Required |
---|---|---|---|
ENABLE_QIITA_TREND | whether to enable qiita trend service | false | |
CHANNEL_FOR_QIITA_TREND | notification channel for qiita trend service | #general | |
SEARCH_WORD_FOR_QIITA_TREND | target word to search data | ✅ |
We are looking for PR of additional functions.