Red HatThis forum is for the discussion of Red Hat Linux.
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.
Where do you expect it is displayed? Crontab does not allocate a pseudo-terminal and all the standard output and standard error is sent to the system mail by default, unless you explicitly redirect them to a file (or to /dev/null). Check the root's mail: most likely you have tons of mails with the standard output from the cron jobs.
being logged as root in your case. Anyway, have you tried to redirect the output of the date command to a file, to test if crontab works? Is the cron daemon running?
I re-read your first post and I noticed that you stated
Quote:
but i not get display of date after 5min
well... with your crontab entry most likely you don't get the output after 5 minutes, but at 5 minutes of the next hours, for example at 6:05, 7:05, 8:05 and so on. If you really want to run the cron job every 5 minutes you can use the syntax
Code:
*/5 * * * * date
This is the same as specifying all the 5 minutes steps: 0,5,10,15,20,25,30,35,40,45,50,55. Maybe this is what you were looking for. See man 5 crontab for future reference.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.