Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
try the command manually - make sure it works.
check the logs - /var/log/cron
best use full paths too, (/bin/tar) as cron has limited shell unless you tell it otherwise
redirect any errors to a log ( 2> /path/to/logfile)
better still and more cleaner, use roots crontab rather then /etc/crontab.
by that, i mean use crontab -e
Ok - I've changed that but this one didn't work either:
Code:
00 00 * * * root /etc/cron.daily/0logwatch
When I run it manually, I receive an email.
If you installed from RPM then on RHEL / RHEL-ish this does not make sense as /usr/bin/run-parts will drive cronjobs in /etc/cron.{hourly,daily,weekly,monthly} from /etc/crontab. So Logwatch is already set to run without you mucking with crontab entries manually.
* By now I strongly suggest you pace things and read the Centos docs and Rute before proceding because you are running too much concurrent threads with too much simple, common questions that could be solved by reading the basic docs and using common sense. With all due respect.
Cron <root@localhost> /bin/tar -cvvf /root/backup-`/bin/date +
/bin/bash: -c: line 0: unexpected EOF while looking for matching ``'
/bin/bash: -c: line 1: syntax error: unexpected end of file
Cron <root@localhost> /bin/gzip /root/backup-`/bin/date +
/bin/bash: -c: line 0: unexpected EOF while looking for matching ``'
/bin/bash: -c: line 1: syntax error: unexpected end of file
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.