Skip to content

Commit 033e868

Browse files
authored
Update IV Functions and Automation.py
1 parent 75255e4 commit 033e868

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

Introduction to Bash Scripting/IV Functions and Automation.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
** hour (0-23)
163163
*** day of month (1-31)
164164
**** month (1-12)
165-
***** day of week (1-7)
165+
***** day of week (0-6) (0 is Sunday)
166166
167167
*** first 'cronjob'
168168
>>>>>> crontab -i : edit crontab w/ nano
@@ -176,3 +176,15 @@
176176
177177
Answer : 15 minutes past every hour on Saturdays and Sundays.
178178
"""
179+
180+
"""
181+
### Creating cronjobs
182+
"""
183+
# Create a schedule for 30 minutes past 2am every day
184+
30 2 * * * bash script1.sh
185+
186+
# Create a schedule for every 15, 30 and 45 minutes past the hour
187+
15,30,45 * * * bash script2.sh
188+
189+
# Create a schedule for 11.30pm on Sunday evening, every week
190+
30 23 * * 0 bash script3.sh

0 commit comments

Comments
 (0)