Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [ziga@ziga-laptop ~]$ systemctl status cronie.service
- ● cronie.service - Periodic Command Scheduler
- Loaded: loaded (/usr/lib/systemd/system/cronie.service; enabled; vendor preset: disabled)
- Active: active (running) since Tue 2016-06-21 00:10:48 CEST; 24min ago
- Main PID: 421 (crond)
- Tasks: 1 (limit: 512)
- CGroup: /system.slice/cronie.service
- └─421 /usr/bin/crond -n
- Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
- [ziga@ziga-laptop ~]$ crontab -l
- */1 * * * * /home/ziga/Dropbox/workspace/operacijski/archlinux/hibernate/cronie-hibernate
- [ziga@ziga-laptop ~]$ cat /home/ziga/Dropbox/workspace/operacijski/archlinux/hibernate/hibernatescript
- #!/bin/sh
- acpi -b | awk -F'[,:%]' '{print $2, $3}' | {
- read -r status capacity
- if [ "$status" = Discharging -a "$capacity" -lt 13 ]; then
- logger "Critical battery threshold"
- systemctl hibernate
- fi
- }
- [ziga@ziga-laptop ~]$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement