Skip to content

Instantly share code, notes, and snippets.

@francoism90
Created October 16, 2021 10:51
Show Gist options
  • Save francoism90/c6f2790dc522d6e39cac28cd233b9afe to your computer and use it in GitHub Desktop.
Save francoism90/c6f2790dc522d6e39cac28cd233b9afe to your computer and use it in GitHub Desktop.

Revisions

  1. francoism90 created this gist Oct 16, 2021.
    6 changes: 6 additions & 0 deletions auto-suspend.service
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    [Unit]
    Description=Suspend system

    [Service]
    Type=oneshot
    ExecStart=/usr/bin/systemctl suspend
    10 changes: 10 additions & 0 deletions auto-suspend.timer
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    [Unit]
    Description=Automatically suspend on a schedule

    [Timer]
    OnCalendar=Mon..Fri 01:30
    OnCalendar=Sat,Sun 04:30
    Persistent=true

    [Install]
    WantedBy=timers.target