On Tue, Sep 22, 2009 at 6:28 PM, <
jharlow1@gmail.com> wrote:
> Assuming you don't need to restart the process but just need to roll the file at 8,
> You could write a bash script that traps a signal, and in the trap, redirect the stdout and stderr (using exec) to a new file (with date/time stamp) or some such
>
> Instead of restarting the process at 8am just send the signal to the script (SIGUSR1 or some such)
> ------Original Message------
> From: Mag Gam
> Sender:
plug-bounces@lists.phillylinux.org
> To: Philadelphia Linux User's Group Discussion List
> ReplyTo: Philadelphia Linux User's Group Discussion List
> Sent: Sep 22, 2009 6:19 PM
> Subject: [PLUG] correct way to do this in bash
>
> Currently for my research I have a process that writes 24 hours and 5
> days a week. Its writes to standard out and there is standard error.
> There is a lot of data, close to 300Gb a day therefore I can't lose a
> minute of outage.
>
> I am capturing daily reports and cutoff is at 8:00AM.
>
> process > /phys/data/20090922/20090922.crac.out
> 2>/phys/data/20090922/20090922.crac.err.out
>
> At 7:59AM I kill the process using cron and restart the process at
> 8:00AM everyday for 5 days using cron. I lose 1 min of simulation data
> :-(.
>
> Is there a clever way to have my process run or restart at 8:00AM
> without cron and no interruption? Or is this the preferred way?
> ___________________________________________________________________________
> Philadelphia Linux Users Group --
http://www.phillylinux.org
> Announcements -
http://lists.phillylinux.org/mailman/listinfo/plug-announce
> General Discussion --
http://lists.phillylinux.org/mailman/listinfo/plug
>
>
> Sent from my Verizon Wireless BlackBerry
> ___________________________________________________________________________
> Philadelphia Linux Users Group --
http://www.phillylinux.org
> Announcements -
http://lists.phillylinux.org/mailman/listinfo/plug-announce
> General Discussion --
http://lists.phillylinux.org/mailman/listinfo/plug
>