What should I do if cron is not executed?

Source: Internet
Author: User
Cron is not executed. FREEBSD & nbsp; system: write a backup database file & #39; mysqlbak & #39; file content: Tbt 'date & nbsp; & nbsp; + % Y _ % m _ % d _ % H % M % s' mysqldump & nbsp;-uttt & nbsp;-pttt & nbsp; ttt & nbsp; cron is not executed, so it's urgent
FREEBSD system:
Write a backup database file 'mysqlbak'
File content:
Tbt = 'date + % Y _ % m _ % d _ % H % M % s'
Mysqldump-uttt-pttt ttt -- default-character-set = gb2312>/8799/uujia _ $ Tbt. SQL

Directly input mysqlbak to perform this backup,
But it cannot be executed under cron. I don't know why. please help me analyze it.
This is how I created the crontab.
Crontab-e
*/1 ***** runmysqlbak

Waiting first

------ Solution --------------------
Add the absolute path.
------ Solution --------------------
*/1 *****/usr/local/etc/mysqlbak. sh

In addition, mysqldump in your backup script must use the absolute path:
/Usr/local/bin/mysqldump-uttt-pttt ............................ ....

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.