This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Edit this file to introduce tasks to be run by cron. | |
# | |
# Each task to run has to be defined through a single line | |
# indicating with different fields when the task will be run | |
# and what command to run for the task | |
# | |
# To define the time you can provide concrete values for | |
# minute (m), hour (h), day of month (dom), month (mon), | |
# and day of week (dow) or use '*' in these fields (for 'any'). | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# m h dom mon dow command | |
0 21 * * * /home/westbam/haskell/everyFiveDays.sh && /home/westbam/Development/cncli/nextslots.sh | |
55 21 * * * /home/westbam/haskell/everyFiveDays.sh && /home/westbam/Development/cncli/sendslots.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cp /home/westbam/cardano/itn_rewards_v1-config.yaml /home/westbam/cardano/itn_rewards_v1-config.yaml.new | |
# find all addresses that are not commented out | |
sed -e '/ address/!d' -e '/^[[:space:]]*#/d' -e '/Brainy/d' -e 's@^.*/ip./\([^/]*\)/tcp/\([0-9]*\).*@\1 \2@' /home/westbam/cardano/itn_rewards_v1-config.yaml | \ | |
while read addr port | |
do | |
echo "Checking $addr:$port" | |
RESULT=$(tcpping -x 1 $addr $port) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd /home/westbam/cardano/storage | |
sqlite3 blocks.sqlite "delete from Blocks where hash in (select bi.hash from BlockInfo bi order by depth desc limit 20);delete from BlockInfo where depth in (select depth from BlockInfo order by depth desc limit 20);update Tags set hash=(select hash from BlockInfo order by depth desc limit 1) where name='HEAD';" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd /home/USERNAME/cardano | |
BLOCK_HASH=`/home/USERNAME/.cargo/bin/jcli rest v0 node stats get --host http://127.0.0.1:3100/api | grep 'lastBlockHash:' | sed -e 's/^[[:space:]]*//' | sed -e 's/lastBlockHash: //'` | |
FOUND=`/usr/bin/node /home/USERNAME/cardano/check_for_block.js $BLOCK_HASH` | |
if [[ "$FOUND" -eq 1 ]]; then | |
echo "`date`: Block Found!!" | |
else |