[LAU] Radio: Winfried Ritsch at ORF1

James Cameron quozl at us.netrek.org
Tue Sep 15 08:37:19 EDT 2009


On Tue, Sep 15, 2009 at 01:44:53PM +0200, Julien Claassen wrote:
> How can I run my mplayer from cron?

Not sure I understand why you need to do it ... but ...

A program on Linux should work identically if the environment and
command line are the same.

The command line can be recovered using /proc/${PID}/cmdline, and the
environment from /proc/${PID}/environ .  The environ file is null
separated, so use the strings command rather than cat.

So to run something from cron that might otherwise be run from a shell
prompt ... means you might have to select certain environment variables
and define them before running the program.  Exactly which depends on
the program.

Oh, and of course, the program should have the same working directory.

-- 
James Cameron
http://quozl.linux.org.au/



More information about the Linux-audio-user mailing list