Skip to content

aarace/vestabot-scheduler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vestabot (Scheduler)

A Node.js service that posts a morning briefing to a Vestaboard on a daily schedule. Each morning it fetches current weather conditions and tide predictions and displays them as a formatted 6×22 character grid.

What it posts

     MONDAY JUNE 22ND
  PARTLY CLOUDY 72°/58°
 RISE 5:12AM SET 8:34PM
HIGH               LOW
10:23AM        3:45PM
 4:12PM        9:58PM

Weather is sourced from Open-Meteo (free, no API key required). Tides are sourced from the NOAA Tides & Currents API (free, no API key required).

Prerequisites

  • Node.js v22+
  • A Vestaboard Read/Write API token (Vestaboard app → Settings → Developer)

Installation

  1. Clone and install dependencies:

    git clone <your-repo-url>
    cd vestabot-scheduler
    npm install
  2. Copy .env.example to .env and fill in your token:

    cp .env.example .env
    Variable Required Description
    VESTABOARD_TOKEN Yes Vestaboard app → Settings → Developer → Read/Write API token
    TIDE_STATION No NOAA station ID for tides (default: 8444762 — Cohasset Harbor)
    LATITUDE No Weather location latitude (default: 42.2456 — Cohasset Harbor)
    LONGITUDE No Weather location longitude (default: -70.8043 — Cohasset Harbor)
    TIMEZONE No Timezone for cron scheduling (default: America/New_York)
    MORNING_CRON No Cron expression for morning briefing (default: 30 6 * * * — 6:30 AM daily)

    To find your NOAA station ID, search at tidesandcurrents.noaa.gov.

Running

node index.js

You should see:

⏰ Vestabot (Scheduler) is running — morning briefing at cron "30 6 * * *" (America/New_York)

The process stays alive and fires the briefing at the scheduled time each day.

Testing

Pass --now to trigger the briefing immediately on startup. The process still stays alive and fires again on its normal schedule, so it's safe to use with a long-running container too.

node index.js --now

In Docker, pass it as a command override:

# Fire immediately and exit (one-shot test)
docker run --rm --env-file .env vestabot-scheduler node index.js --now

# Fire immediately, then keep running on schedule
docker run -d --restart unless-stopped --env-file .env --name vestabot-scheduler vestabot-scheduler node index.js --now

Running in Docker

Build:

docker build -t vestabot-scheduler .

Run:

docker run -d --restart unless-stopped --env-file .env --name vestabot-scheduler vestabot-scheduler

Rebuild after changes:

docker build -t vestabot-scheduler . && docker rm -f vestabot-scheduler && docker run -d --restart unless-stopped --env-file .env --name vestabot-scheduler vestabot-scheduler

Useful commands:

docker logs vestabot-scheduler   # view logs
docker restart vestabot-scheduler
docker stop vestabot-scheduler

About

A schedule daemon for vestaboard daily updates

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Contributors