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.
I sincerely doubt cron is ignoring it. More likely it's having a problem. As a rule cron will email any issue to root. Try
mailx
from the cmd line as root. Incidentally, that should run every minute, which would be a lot(!) of emails. Definite danger of filling the disk. Not to mention the overhead on the system of creating a new process env every minute.
Actually : "no mail for root" is the answer to the cmd.
What you re saying is that cron refuses to treat the "script" because of the danger to fill the disk ?
No, that is not what he said. You need to research cron/crontab to get the correct syntax. You have it running that script every minute, therefore 60 times per hour which can quickly fill a disk.
What are you trying to accomplish with this script? It appears that all you're doing is sending a "subject" (-s) but not a list of installed programs. Further, you're sending it to "admin@localhost". That is not a valid address unless you have created a separate user account for "admin". The administrative account in linux is called "root" with an address of "root@localhost".
I don't know if this is a typo, but the time specification is not valid. /1 alone is not allowed, whereas */1 is. Also note that specifying an interval of 1 minute is the same as leaving the asterisk alone. Furthermore, have you checked the system logs? Maybe there is some message from the cron daemon reporting the incorrect syntax of the crontab.
As tommyttt said, does the user admin exist on your system?
You should use admin, not admin@localhost
Try to run the command from the commandprompt, and see what happens.
Take a look in maillog for any errormessages.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.