Linux crontab-r causes and solutions to no crontab for root

Source: Internet
Author: User

How to use:
crontab file [-u user]-replaces the current crontab with the specified files.
Crontab-[-u user]-replaces the current crontab with standard input.
crontab-1[user]-lists the user's current crontab.
crontab-e[user]-Edit user's current crontab.
crontab-d[user]-Delete the user's current crontab.
Crontab-c dir-Specifies the directory for crontab.
Format of the crontab file: M H d M D cmd.
Crontab-r: Delete the current schedule table
Crontab-l: List the current schedule s

Using crontab

-R is to delete the current user's timetable, causing
Crontab-l error no crontab for root
Workaround: Add a scheduled task file to the current user crontab-u root/var/log/


When you execute a shell script to schedule a task:
/bin/bash^m:bad interpreter:no such file or directory

The solution to this problem is because the shell script's document is not in the correct format

View the document format for the shell document: set FF?

The document format for setting up the shell document is: set Ff=unix

Linux crontab-r causes and solutions to no crontab for root

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.