FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 07-30-2008, 04:05 AM
Nifty Fedora Mitch
 
Default cron job

On Tue, Jul 29, 2008 at 04:29:44PM -0400, Max Pyziur wrote:
> On Tue, 29 Jul 2008 tony.chamberlain@lemko.com wrote:
>
>>
>> Output from nightly cronjobs is filling root's mailbox quickly,
>> and sending everything else to /var/spool/mqueue. These are just
>> status messages (stdout) from the cronjobs which we don't really need
>> mailed to root. Is there anyway to suppress mailings?
>
> Send your jobs to /dev/null like so:
> 30 0 * * * /path/to/program >> /dev/null
>
> Make sense?

The above addresses stdout as requested
also consider stderr..

2 1 * * * $HOME/bin/check-calendar > /dev/null 2>&1 < /dev/null &

In general a unix program should be 'silent' unless there is an error.
If cronjobs are filling the mailbox too quickly then look at the jobs
to see why they are generating so much traffic.

Also since this is root and most users 'never' login as root, ;-) also look at
/etc/aliases. It is possible to send mail for root to a person. That person can
sort, filter, read and dispose of the traffic as needed. Look near the lines:

# Person who should get root's mail
#root: marc

Don't forget to run newaliases.


--
T o m M i t c h e l l
Looking for a place to hang mfors hat.


--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 07-30-2008, 05:06 AM
"Patrick O'Callaghan"
 
Default cron job

On Tue, 2008-07-29 at 21:05 -0700, Nifty Fedora Mitch wrote:
> On Tue, Jul 29, 2008 at 04:29:44PM -0400, Max Pyziur wrote:
> > On Tue, 29 Jul 2008 tony.chamberlain@lemko.com wrote:
> >
> >>
> >> Output from nightly cronjobs is filling root's mailbox quickly,
> >> and sending everything else to /var/spool/mqueue. These are just
> >> status messages (stdout) from the cronjobs which we don't really need
> >> mailed to root. Is there anyway to suppress mailings?
> >
> > Send your jobs to /dev/null like so:
> > 30 0 * * * /path/to/program >> /dev/null
> >
> > Make sense?
>
> The above addresses stdout as requested
> also consider stderr..
>
> 2 1 * * * $HOME/bin/check-calendar > /dev/null 2>&1 < /dev/null &

What's the final "&" for?

poc

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 07-30-2008, 05:17 AM
Ed Kasky
 
Default cron job

At 10:06 PM Tuesday, 7/29/2008, Patrick O'Callaghan wrote -=>

On Tue, 2008-07-29 at 21:05
-0700, Nifty Fedora Mitch wrote:

> On Tue, Jul 29, 2008 at 04:29:44PM -0400, Max Pyziur wrote:

> > On Tue, 29 Jul 2008 tony.chamberlain@lemko.com wrote:

> >

> >>

> >> Output from nightly cronjobs is filling root's mailbox
quickly,

> >> and sending everything else to /var/spool/mqueue.*
These are just

> >> status messages (stdout) from the cronjobs which we don't
really need

> >> mailed to root.* Is there anyway to suppress
mailings?

> >

> > Send your jobs to /dev/null like so:

> > 30 0 * * * /path/to/program >> /dev/null

> >

> > Make sense?

>

> The above addresses stdout as requested

> also consider stderr..

>

> 2****** 1** ***
** **** $HOME/bin/check-calendar > /dev/null
2>&1 < /dev/null &


What's the final "&" for?



From -

http://www.freeos.com/guides/lsst/ch02sec20.html


For background processing (With &, use to put particular command and
program in background)

[linux-command]* &


For example - $ ls / -R | wc -l &




.................................................. .........................

Randomly Generated Quote (181 of 1434):

"Tact is the ability to describe others as they see
themselves."

** --Abraham Lincoln



--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 07-30-2008, 07:54 AM
Cameron Simpson
 
Default cron job

On 29Jul2008 22:17, Ed Kasky <ed@esson.net> wrote:
> At 10:06 PM Tuesday, 7/29/2008, Patrick O'Callaghan wrote -=>
>> On Tue, 2008-07-29 at 21:05 -0700, Nifty Fedora Mitch wrote:
>> > On Tue, Jul 29, 2008 at 04:29:44PM -0400, Max Pyziur wrote:
>> > The above addresses stdout as requested
>> > also consider stderr..
>> > 2 1 * * * $HOME/bin/check-calendar > /dev/null 2>&1 <
>> /dev/null &
>>
>> What's the final "&" for?
>
> From - http://www.freeos.com/guides/lsst/ch02sec20.html
>
> For background processing (With &, use to put particular command and
> program in background)
> [linux-command] &
>
> For example - $ ls / -R | wc -l &

And pointless in a cron job line.
Patrick knows what it does, he's wondering why. So am I.
You're aware cron runs jobs when they're due, even if other jobs are not
yet finished?
--
Cameron Simpson <cs@zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

It takes seven or eight people to send a FAX. - Anonymous IRS guy

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 07-30-2008, 01:38 PM
"Patrick O'Callaghan"
 
Default cron job

On Wed, 2008-07-30 at 17:54 +1000, Cameron Simpson wrote:
> On 29Jul2008 22:17, Ed Kasky <ed@esson.net> wrote:
> > At 10:06 PM Tuesday, 7/29/2008, Patrick O'Callaghan wrote -=>
> >> On Tue, 2008-07-29 at 21:05 -0700, Nifty Fedora Mitch wrote:
> >> > On Tue, Jul 29, 2008 at 04:29:44PM -0400, Max Pyziur wrote:
> >> > The above addresses stdout as requested
> >> > also consider stderr..
> >> > 2 1 * * * $HOME/bin/check-calendar > /dev/null 2>&1 <
> >> /dev/null &
> >>
> >> What's the final "&" for?
> >
> > From - http://www.freeos.com/guides/lsst/ch02sec20.html
> >
> > For background processing (With &, use to put particular command and
> > program in background)
> > [linux-command] &
> >
> > For example - $ ls / -R | wc -l &
>
> And pointless in a cron job line.
> Patrick knows what it does, he's wondering why. So am I.
> You're aware cron runs jobs when they're due, even if other jobs are not
> yet finished?

You took the words right out of my mouth :-)

poc

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 08-05-2008, 10:33 PM
Nifty Fedora Mitch
 
Default cron job

On Wed, Jul 30, 2008 at 09:08:16AM -0430, Patrick O'Callaghan wrote:
> On Wed, 2008-07-30 at 17:54 +1000, Cameron Simpson wrote:
> > On 29Jul2008 22:17, Ed Kasky <ed@esson.net> wrote:
> > > At 10:06 PM Tuesday, 7/29/2008, Patrick O'Callaghan wrote -=>
> > >> On Tue, 2008-07-29 at 21:05 -0700, Nifty Fedora Mitch wrote:
> > >> > On Tue, Jul 29, 2008 at 04:29:44PM -0400, Max Pyziur wrote:
> > >> > The above addresses stdout as requested
> > >> > also consider stderr..
> > >> > 2 1 * * * $HOME/bin/check-calendar > /dev/null 2>&1 <
> > >> /dev/null &
> > >>
> > >> What's the final "&" for?
> > >
> > > From - http://www.freeos.com/guides/lsst/ch02sec20.html
> > >
> > > For background processing (With &, use to put particular command and
> > > program in background)
> > > [linux-command] &
> > >
> > > For example - $ ls / -R | wc -l &
> >
> > And pointless in a cron job line.
> > Patrick knows what it does, he's wondering why. So am I.
> > You're aware cron runs jobs when they're due, even if other jobs are not
> > yet finished?
>
> You took the words right out of my mouth :-)
>

Not sure when this sliped in.... Perhaps on my old Idris system.
Or when I was last testing it on a Wyse50 terminal.




--
T o m M i t c h e l l
Looking for a place to hang my hat.

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 12-02-2008, 01:49 PM
"OOzy Pal"
 
Default cron job

Hello,

I need to move big files from one remote server to other remote
server. I think I can do this by cron jobs. The urls for the backup
data is for example

www.xyz.com/file1.tar.
www.xyz.com/file2.tar

I do

wget -c -t 999 www.xyz.com/file1.tar
wget -c -t 999 www.xyz.com/file2.tar

How can I make a cron job to automatically move these files between
the two servers.




--
OOzy
Ubuntu-Hardy (7.10)

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-02-2008, 02:24 PM
"Stefano Doni"
 
Default cron job

Hi,

*first of all you might want to try rsync instead of wget, it has some cool algorithms to save bandwith, provided that you have to transfer files that are modified often.

Regarding cron jobs, there are two approaces. You can put the job into a user's crontab, or into systemwide crontabs.


You can accomplish the first this way:

$ crontab -e

and then edit your crontab, inserting your command with the desired periodicity.

Otherwise, you can create your crontab line in a file - say 'mysync' - and put it into:


/etc/cron.d/

For crontab job syntax, see man 5 crontab.


I guess the less invasive way is the first one, perhaps it is best to use the second one only for system-wide activities.


2008/12/2 OOzy Pal <oozypal@gmail.com>

Hello,



I need to move big files from one remote server to other remote

server. I think I can do this by cron jobs. The urls for the backup

data is for example



www.xyz.com/file1.tar.

www.xyz.com/file2.tar



I do



wget *-c -t 999 www.xyz.com/file1.tar

wget *-c -t 999 www.xyz.com/file2.tar



How can I make a cron job to automatically move these files between

the two servers.









--

OOzy

Ubuntu-Hardy (7.10)



--

ubuntu-users mailing list

ubuntu-users@lists.ubuntu.com

Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-02-2008, 02:28 PM
Derek Broughton
 
Default cron job

OOzy Pal wrote:

> Hello,
>
> I need to move big files from one remote server to other remote
> server. I think I can do this by cron jobs. The urls for the backup
> data is for example
>
> www.xyz.com/file1.tar.
> www.xyz.com/file2.tar
>
> I do
>
> wget -c -t 999 www.xyz.com/file1.tar
> wget -c -t 999 www.xyz.com/file2.tar
>
> How can I make a cron job to automatically move these files between
> the two servers.

wtp? Just add those commands to an appropriate crontab. You probably
want to add the options to reduce output and put the data into a specific
directory, but you've essentially got everything you need.
--
derek


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-02-2008, 02:56 PM
"Mark Haney"
 
Default cron job

OOzy Pal wrote:
> Hello,
>
> I need to move big files from one remote server to other remote
> server. I think I can do this by cron jobs. The urls for the backup
> data is for example
>
> www.xyz.com/file1.tar.
> www.xyz.com/file2.tar
>
> I do
>
> wget -c -t 999 www.xyz.com/file1.tar
> wget -c -t 999 www.xyz.com/file2.tar
>
> How can I make a cron job to automatically move these files between
> the two servers.
>
>
>
>

You've got lots of options here. Some have suggested rsync, which I
endorse, (using SSH of course), others have said just throw this in a
cron job. That works too.

However, for me, when I need something like this done, I prefer to throw
these lines in a script and have cron execute the script at the set
time. That way, you don't have to edit the cron job for minor changes,
and you can add additional file copies to the script and have those
executed when cron runs the script.



--
Frustra laborant quotquot se calculationibus fatigant pro inventione
quadraturae circuli

Mark Haney
Sr. Systems Administrator
ERC Broadband
(828) 350-2415

Call (866) ERC-7110 for after hours support

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 03:26 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org