请输入您要查询的百科知识:

 

词条 Anacron
释义

  1. Advantages

  2. Disadvantages

  3. See also

  4. References

  5. External links

{{lowercase}}{{more footnotes|date=September 2017}}{{Infobox software
| name = anacron
| title = anacron
| logo =
| logo caption =
| logo size =
| logo alt =
| screenshot =
| caption =
| screenshot size =
| screenshot alt =
| collapsible =
| author = Christian Schwarz
| developer = Itai Tzur, Pascal Hakim, Marcela Mašláňová (Red Hat)
| released =
| discontinued =
| latest release version = 2.3
| latest release date = {{Start date and age|2009|07|16}}
| latest preview version =
| latest preview date = {{Start date and age|2016|08|14}}
| status =
| programming language = C
| operating system = Linux
| platform = POSIX
| size =
| language =
| language count =
| language footnote =
| genre = Job scheduler
| license =
| alexa =
| website = https://sourceforge.net/projects/anacron
| standard =
| AsOf =
}}anacron is a computer program that performs periodic command scheduling, which is traditionally done by cron, but without assuming that the system is running continuously. Thus, it can be used to control the execution of daily, weekly, and monthly jobs (or anything with a period of n days) on systems that don't run 24 hours a day. anacron was originally conceived and implemented by Christian Schwarz in Perl, for the Unix operating system. It was later rewritten in C by Itai Tzur; maintainers have included Sean 'Shaleh' Perry and Pascal Hakim.[1] It is a dependency of cronie which is maintained by Red Hat,[2][3] and Red Hat updates to cronie have included updates to anacron as well.[4]

Advantages

Unix systems commonly run "housekeeping chores" such as log rotation, unused files deletion, indexing local files for the search engine, sending disk usage reports, etc. A program called cron may be used to schedule these tasks.

With cron, tasks are commonly scheduled to be executed when the system is expected to be idle. If the system is off at the moment a task should be run, it will not be executed. Anacron is different and moves tasks to different moments so they are run when the system is on and utilising cron.

Disadvantages

Only the system administrator can configure anacron tasks. In contrast, cron allows non-admin users to configure scheduled tasks. If necessary, a non-admin user can use the at Unix command to request a scheduled task (which is guaranteed to run). Upon starting, this command can then automatically request to run itself at a future date, thus giving the appearance of a regularly scheduled task, with guaranteed execution.

anacron can run tasks only once a day (or less often such as weekly or monthly). In contrast, cron allows tasks to run as often as every minute (but does not guarantee their execution if the system goes down). In practice, this is not usually an issue, since it is rare to have a task that must be guaranteed to run more often than (at least) once a day — especially on a system that is not necessarily running at all times.

If the system is rebooted or started after midnight, the daily tasks are run after a user-specified delay in synchronized fashion (sequential order), so only one anacron-task is running at a time. When that task is finished, the next one starts and so on.

This behaviour can be overridden to allow concurrent (parallel) tasks, but can consume system resources that are needed by the user to do work. In contrast, cron will only run daily tasks at the time set (e.g. in the middle of the night, when presumably the machine is not being used).

fcron is another implementation of cron, which attempts to fulfill the roles of both Vixiecron and anacron.

See also

  • List of Unix commands
  • Cron

References

1. ^{{Cite web|url=https://web.archive.org/web/20180125122117/https://linux.die.net/man/8/anacron|title=anacron(8): runs commands periodically - Linux man page|date=2018-01-25|access-date=2018-03-31}}
2. ^{{Cite web|url=https://web.archive.org/web/20180331234327/https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/6.7_technical_notes/package-cronie|title=7.33. cronie - Red Hat Customer Portal|date=2018-03-31|access-date=2018-03-31}}
3. ^{{Cite web|url=https://web.archive.org/web/20170914224128/www.tuxradar.com/content/automate-linux-cron-and-anacron|title=Automate Linux with Cron and Anacron {{!}} TuxRadar Linux|date=2017-09-14|access-date=2018-03-31}}
4. ^{{Cite web|url=https://github.com/cronie-crond/cronie/releases/tag/cronie-1.5.1|title=cronie-crond/cronie - cronie-1.5.1 release|last=|first=|date=|website=GitHub|language=en|archive-url=|archive-date=|dead-url=|access-date=2018-03-31}}

External links

  • anacron on SourceForge
  • anacron(8) – Linux Programmer's Manual
  • fcron
{{Unix commands}}

1 : Unix process- and task-management-related software

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/11/11 1:35:47