Re: running cronjob output

2021-04-21 Thread David Wright
On Wed 21 Apr 2021 at 00:37:25 (+), brainf...@posteo.net wrote: > On 2021-04-20 12:14 PM, l0f...@tuta.io wrote: > > > On Tue, Apr 20, 2021 at 12:54:06PM +, brainf...@posteo.net wrote: > > > > > > > when i run a cronjob the output from the job is stored and > > > > mailed when the > > > > j

Re: running cronjob output

2021-04-20 Thread brainfart
On 2021-04-20 12:14 PM, l0f...@tuta.io wrote: Hi, On Tue, Apr 20, 2021 at 12:54:06PM +, 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 qu

Re: running cronjob output

2021-04-20 Thread l0f4r0
20 avr. 2021, 19:56 de g...@wooledge.org: > On Tue, Apr 20, 2021 at 07:46:58PM +0200, l0f...@tuta.io wrote: > >> Understood but why `tee` and not a simple redirection to a file (see below)? >> > So they still get the email from cron. > Ah! I had forgotten about the email indeed... Well done & than

Re: running cronjob output

2021-04-20 Thread Greg Wooledge
On Tue, Apr 20, 2021 at 07:46:58PM +0200, l0f...@tuta.io wrote: > Understood but why `tee` and not a simple redirection to a file (see below)? So they still get the email from cron.

Re: running cronjob output

2021-04-20 Thread l0f4r0
Greg, 20 avr. 2021, 19:22 de g...@wooledge.org: > On Tue, Apr 20, 2021 at 07:14:50PM +0200, l0f...@tuta.io wrote: > >> > 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 inter

Re: running cronjob output

2021-04-20 Thread Greg Wooledge
On Tue, Apr 20, 2021 at 07:14:50PM +0200, l0f...@tuta.io wrote: > > 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). tee(1) simply reads once and writes many times.

Re: running cronjob output

2021-04-20 Thread l0f4r0
Hi, > On Tue, Apr 20, 2021 at 12:54:06PM +, 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 abo

Re: running cronjob output

2021-04-20 Thread Greg Wooledge
On Tue, Apr 20, 2021 at 12:54:06PM +, 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? There might be a temp file or there might not. It's best not to