Skip to content

Commit

Permalink
chore: setup crontab for storage server (fixes #76, fixes #77)
Browse files Browse the repository at this point in the history
  • Loading branch information
mistakia committed Jan 10, 2024
1 parent 478b924 commit bbb73c6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server/crontab → server/server-crontab
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@
#
# m h dom mon dow command

*/5 * * * * NODE_ENV=production /root/.nvm/versions/node/v14.17.0/bin/node /root/nano-community/scripts/import-subreddit.mjs -r nanocurrency &>> /var/log/nano-community/import-nanocurrency.log
*/10 * * * * NODE_ENV=production /root/.nvm/versions/node/v14.17.0/bin/node /root/nano-community/scripts/import-subreddit.mjs -r nanotrade &>> /var/log/nano-community/import-nanotrade.log
# subreddit import moved to storage server due to 403 issues
# */5 * * * * NODE_ENV=production /root/.nvm/versions/node/v14.17.0/bin/node /root/nano-community/scripts/import-subreddit.mjs -r nanocurrency &>> /var/log/nano-community/import-nanocurrency.log
# */10 * * * * NODE_ENV=production /root/.nvm/versions/node/v14.17.0/bin/node /root/nano-community/scripts/import-subreddit.mjs -r nanotrade &>> /var/log/nano-community/import-nanotrade.log

*/15 * * * * NODE_ENV=production /root/.nvm/versions/node/v14.17.0/bin/node /root/nano-community/scripts/import-discord.mjs --gid 370266023905198083 &>> /var/log/nano-community/import-nano-discord.log
*/10 * * * * NODE_ENV=production /root/.nvm/versions/node/v14.17.0/bin/node /root/nano-community/scripts/import-discord.mjs --gid 403628195548495882 &>> /var/log/nano-community/import-nano-trade-discord.log

Expand Down
7 changes: 7 additions & 0 deletions server/storage-crontab
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
################################### Storage Server Nano.Community Crontab ###################################

0 */4 * * * NODE_ENV=production /home/user/.nvm/versions/node/v16.14.0/bin/node /home/user/projects/nano-community/scripts/import-subreddit.mjs -r nanocurrency &>> /var/log/nano-community/import-nanocurrency.log
0 */6 * * * NODE_ENV=production /home/user/.nvm/versions/node/v16.14.0/bin/node /home/user/projects/nano-community/scripts/import-subreddit.mjs -r nanotrade &>> /var/log/nano-community/import-nanotrade.log


0 1 * * * NODE_ENV=production /home/user/.nvm/versions/node/v16.14.0/bin/node /home/user/projects/nano-community/scripts/archive-mysql.mjs &>> /var/log/nano-community/archive-mysql.log

0 comments on commit bbb73c6

Please sign in to comment.