Problem with using vixie cron
Im trying to make a cron job for the first time. Im using gentoo with vixie cron. I start the cron deamon fine.
I want to send an email every half hour. From what ive read I put the script into the /etc/cron.d direcotry. The script has been tested and is working. the script is test.sh */30 * * * * root /root/scripts/email.sh and email.sh has #!/bin/bash email -q -s "test subject" myemail@email.com < testlog.txt After this did not work I read some more and did crontab -e */30 * * * * root /root/scripts/email.sh |
rather then have cron run your script... Run "crontab" and add the line itself.
email -q -s "test subject" myemail@email.com < testlog.txt Anything you can successfully run from CLI you can add to cron just adding the time... Here is a sample of how I send an e-mail to myself everyday at 6:15pm 15 18 * * Mon-Fri cat ~/docs/tips.txt | mail -s "tips" kencaz@linuxmail.org KC |
Worked. Cool thanks
|
All times are GMT -5. The time now is 11:44 PM. |