Get Weather Forecast

The German weather DWD offers weather prediction data for many towns for free.

To get the data I use wget and wrote the cron job
/etc/cron.hourly/getSunPrediction

#!/bin/bash

/usr/bin/wget –no-check-certificate https://opendata.dwd.de/weather/local_forecasts/mos/MOSMIX_L/single_stations/L648/kml/MOSMIX_L_LATEST_L648.kmz -O /var/www/altenstadt.kmz
cd /var/www && /usr/bin/unzip altenstadt.kmz
for f in /var/www/MOSMIX*; do
  mv "$f" /var/www/altenstadt.kml
done

My /etc/crontab to execute the script to update the weather forecast 4 times per day looks like:

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user  command
31 4,10,16,22 * * *     www-data    cd / && run-parts --report /etc/cron.hourly
Login
Valid HTML 4.01!