-
Notifications
You must be signed in to change notification settings - Fork 5
/
Update_Content_Team1.txt
63 lines (46 loc) · 2.93 KB
/
Update_Content_Team1.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
itc134 fl16 linux shell resource
Group 1
[Cron: Automate and Schedule Scripts]
[Graphic Example 1]
http://www.networknuts-web.biz/wp-content/uploads/2014/10/cron-logo.png
[What is a cron?]
Cron jobs are simply bash scripts that run when you boot up your computer and when certain time conditions have been met. For them, you write your script, save it, and then run a command to add a new cron job that points to the location of the newly-saved script.
[What are they good for?]
Cron is a Linux/Unix utility, which schedules a command or script on your server to run automatically at a specified time and date. A cron job is the scheduled task itself. Cron jobs can be very useful to automate repetitive tasks.
For example, you can set a cron job to delete temporary files every week to conserve your disk space. Some programs, such as Drupal, may even require you to set up a cron job to perform certain functions.
Also, you might use a cron job to send out an email report on a daily basis, or to update some cached data every 10 minutes, or refresh summary information once an hour.
Scripts executed as a cron job are typically used to modify files or databases. However, they can perform other tasks that do not modify data on the server, like sending out email notifications.
[Graphic Example 3]
http://www.pc-freak.net/images/crontab-execute-cron-jobs-every-second-on-linux-cron-logo.png
[Who typically uses them]
- System Administrators
- Database Administrators
- Power Users
- Developers
[Graphic Example 2]
https://c.marketingtechblog.com/wp-content/uploads/2008/01/cron.jpg
[Elements of a Cron Job]
Most cron jobs include three components:
- The script that is to be called or executed.
- The command that executes the script on a recurring basis (typically set in the Panel).
- The action or output of the script (which depends on what the script being called does).
[Cron Job Limits]
- You may NOT run a cron job more often than every minute.
- It isn’t suitable for complex, event-driven tasks.
- Not flexible for running tasks.
- No queueing for cron: no specific ordering of jobs.
- Won’t be able to protect resources from having too many things running out of it at once.
Let's get started!
In this example we have a script that resizes images and a cron job that schedules and executes the script.
[Code Snips and instructions]
[Learn More:]
http://www.unixgeeks.org/security/newbie/unix/cron-1.html
https://en.wikipedia.org/wiki/Cron
https://www.thesitewizard.com/general/set-cron-job.shtml
https://en.wikipedia.org/wiki/Ken_Thompson
http://www.alleft.com/sysadmin/common-cron-mistakes/
http://askubuntu.com/questions/23009/reasons-why-crontab-does-not-work
http://www.nncron.ru/help/EN/working/cron-format.htm#STARTTIME
[Citations]
1 http://www.makeuseof.com/tag/5-beginner-linux-setup-ideas-cron-jobs-shell-scripts/
2 https://www.helpsystems.com/resources/articles/cron-scheduling-old-fallback