Skip to content

Commit

Permalink
Run hourly
Browse files Browse the repository at this point in the history
  • Loading branch information
malteo committed Jan 10, 2024
1 parent b3bb226 commit 5d3c569
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM alpine:3.19
RUN apk --no-cache add nushell
COPY bitcoin-fee-notifier.nu /etc/periodic/15min/
COPY bitcoin-fee-notifier.nu /etc/periodic/hourly/
ARG NTFY_TOPIC
ENV NTFY_TOPIC=${NTFY_TOPIC}
ENV CHEAP_FEE 35
Expand Down
6 changes: 3 additions & 3 deletions bitcoin-fee-notifier.nu
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
use std log

if "NTFY_TOPIC" not-in $env {
log error "You must define a ntfy.sh topic as NTFY_TOPIC"
exit 1
log error "You must define a ntfy.sh topic as NTFY_TOPIC"
exit 1
}

const last_fee = '/tmp/last_cheap_fee'
Expand All @@ -23,7 +23,7 @@ if $fee < $cheap {
$fee | save -f $last_fee
log debug $'Notified cheap transaction fees at ($fee) sat/vB'
} else {
log debug $'Already notified transaction fees under ($fee) sat/vB'
log debug $'Already notified transaction fees at ($fee) sat/vB'
}
} else {
log debug $'Transaction fees too high at ($fee) sat/vB'
Expand Down

0 comments on commit 5d3c569

Please sign in to comment.