-
-
Notifications
You must be signed in to change notification settings - Fork 31
Running on Linux and Raspberry Pi
Jef LeCompte edited this page Jul 20, 2025
·
1 revision
Here’s a quick guide for installing Node.js on Linux and Raspberry Pi (Raspbian OS) and setting up a daily scheduled task to run your zap2xml script with the required arguments:
-
Installing Node.js
- Open Terminal.
- Update your package list:
sudo apt update
- Install Node.js (LTS version):
sudo apt install nodejs npm
- Verify installation:
node -v npm -v
-
Install zap2xml dependencies and build
In Terminal, run:
cd /path/to/zap2xml
npm install
npm run build
- Create a shell script to run zap2xml
Create a file named run-zap2xml.sh
in your zap2xml folder with the following content (edit the arguments as needed):
#!/bin/bash
cd /path/to/zap2xml
node dist/index.js --lineupId=YOUR_LINEUP_ID --timespan=15 --country=USA --postalCode=12345
Replace YOUR_LINEUP_ID
, 15
, USA
, and 12345
with your actual values.
Make the script executable:
chmod +x run-zap2xml.sh
- Schedule a daily task using cron
- Open crontab editor:
crontab -e
- Add the following line to run the script daily at 2:00 AM (adjust time as needed):
0 2 * * * /path/to/zap2xml/run-zap2xml.sh
- Save and exit.
- Open crontab editor:
This will run your zap2xml script once a day with your specified arguments on your Linux machine or Raspberry Pi.