Re: cron jobs + (some?) output

From: Ben Russo (ben_at_muppethouse.com)
Date: 12/07/04

  • Next message: David Purton: "Re: M$ USB-key"
    To: debian-user@lists.debian.org
    Date: Tue, 07 Dec 2004 17:12:31 -0500
    
    

    Hugo Vanwoerkom wrote:
    ...
    > I run mplayer from a script in the early morning as a cron job.
    > My problem (small one) was that since there is no shell, where is the
    > output?
    > Gues what: it gets sent to root!

    Yes, output from cron processes is sent via e-mail to the owner of the
    process using local mail delivery agent. This is the standard way it
    works. SURPRISE! (he he, just kidding, but this has been hapenning for
    at least 15 years.)

    If you were running the process in the root crontab, then the output of
    the commands will be sent to the root user via local "mail" command.

    If you want to stop this, you can redirect the output of the mplayer to
    a file every day.... for example, in your crontab have something like
    this: (Remember to remove the newlines, this is wrapped at 80 chars)

    3 4 * * * rm -f /var/log/mplayer.log; mv /var/log/mplayer.log
    /var/log/mplayer.log.yesterday; mplayer -command -options blah blah >
    /var/log/mplayer.log 2>&1

    This command will create a new log every day, and keep yesterdays log
    too, but will lose all older logs.

    -Ben.

    -- 
    To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: David Purton: "Re: M$ USB-key"

    Relevant Pages

    • Re: VLC (and Parole) quirks
      ... generally if you hit a permission denied try as root. ... mplayer is usually quite good at playing anything. ... If that works then to dump title 1 (even if it doesn't work I guess ... I don't know about using mplayer from the command line, ...
      (uk.comp.os.linux)
    • PATH braincramp
      ... I'm having a tussle with one of those things I've done a zillion times, but now I can't fathom what the heck is wrong. ... When I run flexbackup from a cron job (as root), the following error is returned by e-mail to root: ... When I run the command from Webin's interface for scheduled cron jobs, ...
      (freebsd-questions)
    • Re: cron jobs + (some?) output
      ... > It start a script that forks and runs execve mplayer to record KUSC ... > Then 3 hours later I start another cron job that kills the former. ... why are you receiving mail as root? ...
      (Debian-User)
    • Re: [SLE] Updating the system clock
      ... > I set a cron job to run as root, the command is: ... Jeff Dierking ...
      (SuSE)
    • Re: [opensuse] cron jobs and paths
      ... from the path, however after setting up a up a cron job, running as me, it ... Even root has the command in its path. ... fix the cron job environment? ...
      (SuSE)