Editing 1728: Cron Mail
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 10: | Line 10: | ||
On {{W|Unix}}-like systems, {{W|Cron|cron}} is a system utility that runs tasks on a schedule. This program has been around since the early days of Unix and has not changed much - it is still one of the most widely used functions in modern operating systems. Many administrative tasks on servers are automated using cron, including monitoring and updates. | On {{W|Unix}}-like systems, {{W|Cron|cron}} is a system utility that runs tasks on a schedule. This program has been around since the early days of Unix and has not changed much - it is still one of the most widely used functions in modern operating systems. Many administrative tasks on servers are automated using cron, including monitoring and updates. | ||
− | When a cron job produces output, cron's default behavior is to send an email to the user account under which the job ran. However, in most situations, an email address has not been set up for that user, so the email is instead written to a mailbox file. Most Unix shells will notify the user with a message like "You have new mail" when this mailbox file is updated, but if the user doesn't know how to check this mail file, they will likely just ignore the message. | + | When a cron job produces output, cron's default behavior is to send an email to the user account under which the job ran. However, in most situations, an email address has not been set up for that user, so the email is instead written to a mailbox file instead. Most Unix shells will notify the user with a message like "You have new mail" when this mailbox file is updated, but if the user doesn't know how to check this mail file, they will likely just ignore the message. |
− | In this case, Cueball has been ignoring his mailbox for fifteen years. When he finally learns where to look, he discovers more than a gigabyte worth of messages from the cron program, the vast majority of which are likely meaningless. Ponytail | + | In this case, Cueball has been ignoring his mailbox for fifteen years. When he finally learns where to look, he discovers more than a gigabyte worth of messages from the cron program, the vast majority of which are likely meaningless. Ponytail suggests "fixing the cron job" - her suggestion is likely to figure out why the job is generating output and either fix that task so it doesn't, or redirect its output to something like <code>/dev/null</code>, which simply discards the text. Cueball, however, interprets the tremendous amount of email as spam and decides to take action, redirecting the cron emails to <code>/etc/crontab</code>, the main configuration file that contains all of its scheduling information. He apparently believes that this will either break cron or cause it to spam itself with an exponentially-increasing amount of email. |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | In reality, the first of these options is most likely, as the text output from the cron jobs is unlikely to be in the same format as a valid schedule entry in the crontab file. Invalid scheduling information will cause cron to ignore the file - this will then cause cron to have no scheduled jobs at all, and it will simply do nothing after the first job that sends itself an email. Cueball will, in fact, have stopped the tide of cron spam, but will likely cause other problems due to the sudden lack of critical system maintenance tasks. | ||
The title text shows that Cueball is somewhat aware of what cron does, including the fact that it's existed pretty much unchanged for several decades, but he hasn't bothered to really get into understanding it, treating it more as a foe to vanquish rather than as a tool to understand and use. | The title text shows that Cueball is somewhat aware of what cron does, including the fact that it's existed pretty much unchanged for several decades, but he hasn't bothered to really get into understanding it, treating it more as a foe to vanquish rather than as a tool to understand and use. |