Hi,

> On Tue, Apr 20, 2021 at 12:54:06PM +0000, brainf...@posteo.net wrote:
>
>> when i run a cronjob the output from the job is stored and mailed when the
>> job finishes. where is this output stored? can i read it while the job is
>> running?
>>
Is your question global or specific?

If it's about a specific use case, please provide us with more details, 
especially your cron job definition, even the called script if there is one.

> Just focus on your actual goal: you have a cron job that takes a long
> time to run, and you want to see the output in progress.  Just use tee(1)
> to save a copy of the output in a file of your choice.
>
> a b c d e   /my/job 2>&1 | tee /var/tmp/my-job-output
>
Greg, I don't understand the usage of `tee` here as there is no associated 
terminal session (cron is not interactive).

I mean, where can the OP expect the output to be automatically displayed please 
(I'm not speaking about the file of course)?

I'm asking because you suggest  `2>&1 | tee /var/tmp/my-job-output` and not `&> 
/var/tmp/my-job-output`...

Best regards,
l0f4r0

Reply via email to