Skip to content

Commit e6eac22

Browse files
Create Persistence_Mechanisms.md
1 parent 75fca3f commit e6eac22

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
## Cron Jobs (/etc/crontab)
2+
The /etc/crontab file is a system-wide configuration file used to schedule periodic tasks or jobs on Unix-like operating systems, including Linux. It is part of the cron system, which is a time-based job scheduler in Unix-like operating systems.
3+
Here's an example of what you might find in an /etc/crontab file:
4+
5+
```bash
6+
# /etc/crontab: system-wide crontab
7+
# Unlike any other crontab you don't have to run the `crontab'
8+
# command to install the new version when you edit this file.
9+
# This file also has a username field, that none of the other crontabs do.
10+
11+
SHELL=/bin/bash
12+
PATH=/sbin:/bin:/usr/sbin:/usr/bin
13+
MAILTO=root
14+
15+
# For details see man 5 crontab
16+
17+
# Example of job definition:
18+
# .---------------- minute (0 - 59)
19+
# | .------------- hour (0 - 23)
20+
# | | .---------- day of month (1 - 31)
21+
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
22+
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
23+
# | | | | |
24+
# * * * * * user-name command to be executed
25+
17 * * * * root cd / && run-parts --report /etc/cron.hourly
26+
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
27+
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
28+
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
29+
```

0 commit comments

Comments
 (0)