LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-09-2005, 02:25 AM   #1
staul
LQ Newbie
 
Registered: Mar 2004
Location: Singapore
Distribution: Fedora Core 3
Posts: 14

Rep: Reputation: 0
crontab MAILTO and config problems


I have two problems about using crontab.

1. usually I put MAILTO to the crontab, so that output msgs of jobs are recorded. but is there a way to disable this feature on some of the jobs in crontab while keeping it on others? you know, sometimes i have a job scheduled to run very frequently, say once every five mins, and i may never worry it would go wrong. i don't want it to flood my mailbox.

if i cannot disable mailto on some jobs of one crontab, is there a way to create several crontabs for single user?

2. i always use "crontab -e" to edit my crontab. and i found actually the data is stored at /var/spool/cron/username. but i'd like the crontab to be stored at my home directory as all other apps config data. this faciliates the backup of my home directory and app settings. does cron provide anything like .cron file at home directory that it will be applied?

thanks!
 
Old 04-09-2005, 04:39 AM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,797

Rep: Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943
1. To avoid mail on output of crontab job, just add :
Code:
> /dev/null 2>&1
...at the end of crontab line you don't want output
 
  


Reply


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
problems with crontab p.gaic Linux - Software 7 07-25-2005 05:36 AM
problems setting the user in crontab p.gaic Linux - Software 1 07-14-2005 11:07 PM
Crontab Config Question zolo44 Linux - General 2 02-25-2005 01:18 PM
crontab problems dshafi Linux - General 1 08-19-2004 02:51 AM
problems with crontab for root reqvidd Linux - Newbie 2 11-10-2003 07:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:52 AM.

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