updated notes
This commit is contained in:
+7
-4
@@ -264,21 +264,24 @@ sudo systemctl unmask sshd # Unmask the sshd service
|
||||
sudo nano /etc/systemd/system/myapp.service
|
||||
# [Unit]
|
||||
# Description=My App
|
||||
# After=network.target
|
||||
|
||||
# [Service]
|
||||
# Type=simple
|
||||
# ExecStart=/usr/bin/myapp
|
||||
# User=myuser
|
||||
|
||||
|
||||
### Creating a timer ###
|
||||
sudo nano /etc/systemd/system/myapp.timer
|
||||
# [Unit]
|
||||
# Description=My App Timer
|
||||
# After=myapp.service
|
||||
|
||||
# [Timer]
|
||||
# OnBootSec=10min
|
||||
# OnCalendar=daily
|
||||
# OnBootSec=10min # Run the timer 10 minutes after the system starts
|
||||
# OnCalendar=*-*-* 10:00:00 # Run at 10:00 AM every day
|
||||
|
||||
# [Install]
|
||||
# WantedBy=graphical.target # Run the timer on the graphical target
|
||||
|
||||
### Tying the timer to the service ###
|
||||
sudo systemctl link /etc/systemd/system/myapp.timer
|
||||
|
||||
Reference in New Issue
Block a user