Giter VIP home page Giter VIP logo

sched's Introduction

Features

  • Erfordert nicht, dass der PC/Server ständig eingeschaltet ist. (→ wie Anacron)
  • Maximale Ausführungszeit (Option time_limit)
  • Error-Handling
    • Nicht erneut versuchen
    • Konfigurierbare Wartezeit
      • Wartet bislang eine Stunde, bis fehlgeschlagene Jobs erneut ausgeführt werden.
    • Exponential backoff
  • Benachrichtigungen
    • Desktop (notify-send)
    • E-Mail (bislang nur indirekt über crontab)
  • Klein und übersichtlich.
  • Geschrieben in Python. :)

Einrichtung

Wichtig ist nur, dass die main.py von Sched regelmäßig ausgeführt wird. Das kann zum Beispiel über einen crontab-Eintrag erreicht werden:

* * * * * /path/to/Sched/main.py > /dev/null

Systemd-Daemon

Der Systemd-Daemon verhindert z.B. den Log-Spam von cron. TODO: --user-Flag?

systemctl --user link $(realpath sched_daemon.service) # zu Debug-Zwecken
# systemctl --user daemon-reload
# Prüfe, ob alles funktioniert:
systemctl --user start sched_daemon.service
systemctl --user status sched_daemon.service
# Funktioniert? Dann „permanent“ starten:
systemctl --user enable sched_daemon.service

Blick auf die Konkurrenz

  • cron ist natürlich der Standard. Wenn ich aber z.B. täglich um 16 Uhr einen Job ausführen möchte, den PC aber erst um 20 Uhr einschalte, wird der Job nicht ausgeführt.

  • anacron löst dieses Problem, benachrichtigt aber wie auch cron nur per E-Mail. Empfehlung in diesem Zusammenhang: nullmailer.

  • jobber hat ein nettes CLI und geht super mit Fehlern um (Benachrichtigungen, exponential backoff, …). Leider fehlt die anacron-Funktionalität und das Projekt ist seit einer Weile nicht mehr aktiv.

sched's People

Contributors

nicoweio avatar

Stargazers

 avatar  avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.