Skip to content

Instantly share code, notes, and snippets.

@sophuric
Created January 9, 2025 21:49
Show Gist options
  • Select an option

  • Save sophuric/3025c94694b82334cc2ac6d380a87d59 to your computer and use it in GitHub Desktop.

Select an option

Save sophuric/3025c94694b82334cc2ac6d380a87d59 to your computer and use it in GitHub Desktop.

Revisions

  1. sophuric created this gist Jan 9, 2025.
    7 changes: 7 additions & 0 deletions crontab
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    # /etc/crontab: configuration file for cron

    # See cron(8) and crontab(5) for details.

    # m h dom mon dow user command
    0 * * * * root /root/idlenice /root/fetch-updates
    @reboot root /root/idlenice /root/fetch-updates
    2 changes: 2 additions & 0 deletions fetch-updates
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    #!/bin/bash
    pidof -sq pacman || { ping example.com -qw2 -c1 && checkupdates -d; }
    2 changes: 2 additions & 0 deletions idlenice
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    #!/bin/sh
    nice -n 19 ionice -c 2 -n 7 "$@"