Scheduled Oracle backup in Ubuntu11.04

Source: Internet
Author: User
In Ubuntu, the/etc/crontabsudovi/etc/crontabcron service needs to read not only all files in/var/spool/cron once per minute, but also/etc/crontab once, therefore, we can use the cron service to configure this file. Crontab configuration is intended for a user, and editing/etc/crontab is a system task. The file format of this file is: SHEL

Ubuntu

Edit file/etc/crontab

Sudo vi/etc/crontab

The cron service not only reads all files in/var/spool/cron every minute, but also reads/etc/crontab once. Therefore, we can use the cron service to configure this file. Crontab configuration is intended for a user, and editing/etc/crontab is a system task. The file format of this file is:

SHELL =/bin/bash
PATH =/sbin:/bin:/usr/sbin:/usr/bin =
MAILTO = root // if an error occurs or data is output, the data is sent to this account as an email.
HOME = // path of the user running. The root directory is used here.
# Run-parts
01 *** root run-parts/etc/cron. hourly // execute scripts in/etc/cron. hourly as root every hour
02 4 *** root run-parts/etc/cron. daily // execute the script in/etc/cron. daily as the root user every day.
22 4 ** 0 root run-parts/etc/cron. weekly // execute scripts in/etc/cron. weekly as the root user every week.
42 4 1 ** root run-parts/etc/cron. monthly // execute the script in/etc/cron. monthly as the root user every month.

Note the "run-parts" parameter. If this parameter is removed, you can write a script name to run later, instead of the folder name.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.