Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This 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!


  Search this Thread
Old 07-05-2005, 05:08 PM   #1
Registered: May 2004
Location: Tacoma, Wa
Distribution: Gentoo
Posts: 94

Rep: Reputation: 15
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

*/30 * * * * root /root/scripts/

and has

email -q -s "test subject" < testlog.txt

After this did not work I read some more and did

crontab -e
*/30 * * * * root /root/scripts/
Old 07-05-2005, 05:19 PM   #2
Senior Member
Registered: Mar 2005
Location: Las Vegas, NV
Distribution: Mandriva Slackware FreeBSD
Posts: 1,468

Rep: Reputation: 48
rather then have cron run your script... Run "crontab" and add the line itself.

email -q -s "test subject" < 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"

Old 07-05-2005, 05:38 PM   #3
Registered: May 2004
Location: Tacoma, Wa
Distribution: Gentoo
Posts: 94

Original Poster
Rep: Reputation: 15
Worked. Cool thanks


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
shell script using /etc/cron.hourly to execute cron.php file? rioguia Programming 3 06-11-2008 08:09 AM
How to Upgrade [ vixie-cron-4.1-2_EL3 ] rpm maxboost Linux - Enterprise 1 03-07-2005 04:40 PM
vixie-cron issues Bigun Linux - Software 1 12-17-2004 09:08 AM
dual entries in cron log for cron.daily cpharvey Linux - General 3 02-27-2003 02:30 PM
Cron/Vixie runs jobrotate 6 hours late SEL Linux - General 0 04-21-2002 04:56 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:26 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration