/actions-weather-data-logger

how to schedule with Python scripts and GitHub Actions to Automat Weather data logging

Primary LanguageRoffMIT LicenseMIT



How to Schedule a Python script with GitHub Actions to Automate timely routine tasks !

GitHub contributors GitHub issues GitHub pull requests GitHub GitHub commit activity Maintenance

Display GitHub Action Badge run main.py

UsageActions-YMLEnvironmentGitignoreLicensemain pythonRead meRequirmentsStatus Log

If this helped you and Loved the tool? Please consider donating 💸 to help it improve!

Danigy Danigy

This example shows how to run a Python script as cron job with GitHub Actions. It calls an API once a week (could be any schedule you want), logs the response in status.log, and automatically pushes the changes to this repo.

  • Implement your script in main.py
  • Inspect and configure cron job in GitHub Action .github/workflows/actions.yml
  • It can install and use third party packages from requirements.txt
  • Secret environment variables can be used. Set secrets in Settings/Secrets/Actions -> 'New repository secret'. Use the same secret name inside actions.yml and main.py