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
|
sudo nano /etc/systemd/system/myapp.service
|
||||||
# [Unit]
|
# [Unit]
|
||||||
# Description=My App
|
# Description=My App
|
||||||
# After=network.target
|
|
||||||
|
|
||||||
# [Service]
|
# [Service]
|
||||||
|
# Type=simple
|
||||||
# ExecStart=/usr/bin/myapp
|
# ExecStart=/usr/bin/myapp
|
||||||
|
# User=myuser
|
||||||
|
|
||||||
|
|
||||||
### Creating a timer ###
|
### Creating a timer ###
|
||||||
sudo nano /etc/systemd/system/myapp.timer
|
sudo nano /etc/systemd/system/myapp.timer
|
||||||
# [Unit]
|
# [Unit]
|
||||||
# Description=My App Timer
|
# Description=My App Timer
|
||||||
# After=myapp.service
|
|
||||||
|
|
||||||
# [Timer]
|
# [Timer]
|
||||||
# OnBootSec=10min
|
# OnBootSec=10min # Run the timer 10 minutes after the system starts
|
||||||
# OnCalendar=daily
|
# 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 ###
|
### Tying the timer to the service ###
|
||||||
sudo systemctl link /etc/systemd/system/myapp.timer
|
sudo systemctl link /etc/systemd/system/myapp.timer
|
||||||
|
|||||||
Reference in New Issue
Block a user