-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrefresh_db.sh
executable file
·35 lines (24 loc) · 1022 Bytes
/
refresh_db.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh
# Create a variable to hold the log file path
LOG_FILE="./logs/cron.log"
echo "Running your scripts..." >> $LOG_FILE
# Clear the log file before appending new details
echo "Clearing log file..."
> $LOG_FILE
export PATH="$PATH:/home/ubuntu/.nvm/versions/node/v16.18.1/bin"
# Run the fetch:ledger-data command
echo "Running fetch:ledger-data..." >> $LOG_FILE
npm run fetch:ledger-data >> $LOG_FILE 2>&1
# Run the update:trackedProjects command
echo "Running update:trackedProjects..." >> $LOG_FILE
npm run update:trackedProjects >> $LOG_FILE 2>&1
# Run the calculate:percents command
echo "Running calculate:percents..." >> $LOG_FILE
npm run calculate:percents >> $LOG_FILE 2>&1
# Run calculate:nftAnalytics command
echo "Running calculate:nftAnalytics..." >> $LOG_FILE
npm run calculate:nftAnalytics >> $LOG_FILE 2>&1
# Run calculate:iouRichlist command
echo "Running calculate:nftAnalytics..." >> $LOG_FILE
npm run calculate:iouRichlist >> $LOG_FILE 2>&1
echo "Scripts ran successfully!" >> $LOG_FILE