{"id":15989018,"url":"https://github.com/phrozenbyte/cron-notify","last_synced_at":"2025-05-07T04:12:39.252Z","repository":{"id":152899973,"uuid":"73197019","full_name":"PhrozenByte/cron-notify","owner":"PhrozenByte","description":"FreeDesktop.org-compatible notification service to periodically ask for acknowledgement before executing a cronjob.","archived":false,"fork":false,"pushed_at":"2024-11-01T13:58:15.000Z","size":100,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-07T04:12:28.726Z","etag":null,"topics":["borgbackup","cron","cronjob","crontab","gui","notification","python2","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PhrozenByte.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-08T15:02:36.000Z","updated_at":"2024-12-30T22:22:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"1241a382-039c-485e-983c-a59d1f38b274","html_url":"https://github.com/PhrozenByte/cron-notify","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhrozenByte%2Fcron-notify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhrozenByte%2Fcron-notify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhrozenByte%2Fcron-notify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhrozenByte%2Fcron-notify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PhrozenByte","download_url":"https://codeload.github.com/PhrozenByte/cron-notify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252810274,"owners_count":21807759,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["borgbackup","cron","cronjob","crontab","gui","notification","python2","python3"],"created_at":"2024-10-08T04:22:54.695Z","updated_at":"2025-05-07T04:12:39.211Z","avatar_url":"https://github.com/PhrozenByte.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"cron-notify\n===========\n\n`cron-notify` is a FreeDesktop.org-compatible notification service to periodically ask for acknowledgement before executing a cronjob. It is often used for backup software and was previously known as `borg-notify`, referring to its original purpose as a notification service for [Borg Backup](http://borgbackup.readthedocs.io/).\n\nInstall\n-------\n\nYou can find the list of Python packages `cron-notify` depends on in the `requirements.txt`. However, please note that PyGObject explicitly disallows building itself using `distutils`. You aren't required to use PyPI in general, you will likely find the required Python packages in the package sources of your distribution. If you e.g. use Debian, you will have to install the `python3-croniter`, `python3-dbus`, `python3-gi`, `python3-notify2` and `python3-xdg` packages (or their Python 2 equivalents).\n\n`cron-notify` works with Python 3 only. It was tested with Python 3.12 on Arch Linux, however, it *should* work with any other distribution. If not, please don't hesitate to open a new [Issue on GitHub](https://github.com/PhrozenByte/cron-notify/issues).\n\nOn Debian-based distributions you can build a `.deb` using the provided `_build/builddeb.sh` script (build dependencies: `build-essential`, `fakeroot` and `python3-all`). On Arch Linux you can use the [AUR package](https://aur.archlinux.org/packages/cron-notify/).\n\nUsage\n-----\n\n```\n$ cron-notify --help\nusage: cron-notify [OPTION]... [CONFIG]...\n\ncron-notify is a FreeDesktop.org-compatible notification service to\nperiodically ask for acknowledgement before executing a cronjob. It is often\nused for backup software.\n\nArguments:\n  CONFIG                File to read configuration from. You can either\n                        specify a filename ('config.ini'), a absolute path\n                        ('/path/to/config.ini'), or a relative path\n                        ('./config.ini'). By specifying a filename, cron-\n                        notify searches for a accordingly named file in the\n                        configuration search path of 'cron-notify' as\n                        specified by the XDG Base Directory specification\n                        (e.g. '~/.config/cron-notify/'). Defaults to 'cron-\n                        notify.ini'\n\nApplication options:\n  --critical            Work on log level CRITICAL\n  --error               Work on log level ERROR\n  -q, --quiet, --warning\n                        Work on log level WARNING\n  --info                Work on log level INFO (default)\n  -v, --verbose, --debug\n                        Work on log level DEBUG\n\nHelp options:\n  --help                Display this help message and exit\n  --version             Output version information and exit\n\nPlease report bugs using GitHub at \u003chttps://github.com/PhrozenByte/cron-\nnotify\u003e. Besides, you will find general help and information about cron-notify\nthere.\n```\n\nConfig\n------\n\n`cron-notify` reads its config from `cron-notify.ini` in `~/.config/cron-notify/` by default. A config file for Borg Backup might look like the following:\n\n```ini\n[DEFAULT]\napp = borg-notify\nname_tpl = Borg Backup \"{}\"\nname_tpl_empty = Borg Backup\n\nnotification_summary = Borg Backup\nnotification_message = It's time to backup your data! Your next {} is on schedule.\nnotification_icon = borg\n\nsuccess_summary = Borg Backup\nsuccess_message = Your recent {} was successful. Yay!\nsuccess_icon = borg\n\nwarning_summary = Borg Backup\nwarning_message = Your recent {} finished with warnings. \n    This might not be a problem, but you should check your logs.\nwarning_icon = borg\n\nfailure_summary = Borg Backup\nfailure_message = Your recent {} failed due to a misconfiguration. \n    Check your logs, your backup didn't run!\nfailure_icon = dialog-error\n\n[lunch-backup]\ncommand = borg-lunch-backup\nname = Lunch Backup\ncron = 30 12 * * *\nsleep = 1800\npower = yes\n```\n\nIn the above example, `cron-notify` shows a notification every day at 12:30 (`cron = 30 12 * * *`), asking the user to start or skip the \"Lunch Backup\" (`name = Lunch Backup`). If the system is currently not on main power, the notification is deferred until it is on main power (`power = yes`). If the user dismisses/ignores this notification, `cron-notify` shows it half an hour (1800 seconds; `sleep = 1800`) later again. If the user decides to start the backup, `cron-notify` executes `borg-lunch-backup` (`command = borg-lunch-backup`). If the command returns the special exit status 75 (`EX_TEMPFAIL`), `cron-notify` treats it as if the user dismissed the notification. Any other exit status yields a appropiate status notification. As usual, exit status 0 indicates success, whereas any nonzero exit status indicates some sort of failure. The special exit status 254 indicates that the action was taken, but something non-essential went wrong (\"finished with warnings\").\n\nBackup scripts\n--------------\n\nIf you want to use `cron-notify` to backup your data, you can often simply let `cron-notify` execute the backup tool's command periodically. However, some backup tools (like [Borg Backup](http://borgbackup.readthedocs.io/)) or more complex setups require you to create a custom backup script to take care of everything that needs to be done when backing up your data. You can find some inspiration and examples of custom backup scripts in [our Wiki](https://github.com/PhrozenByte/cron-notify/wiki).\n\nIf you've created a custom backup script that might be useful for others, please let us know by adding it to our Wiki!\n\nLicense \u0026 Copyright\n-------------------\n\nCopyright (C) 2016-2024  Daniel Rudolf \u003chttp://www.daniel-rudolf.de/\u003e\n\nThis program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 of the License only.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the [GNU General Public License](LICENSE) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphrozenbyte%2Fcron-notify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphrozenbyte%2Fcron-notify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphrozenbyte%2Fcron-notify/lists"}