Hi,
Setup:
Dollar Universe v6.10.31
The underlying node in this case has Linux RedHat
I have a resource that is used for parsing a log file. The resource is defined as follows:
General Name: Resource1
General Type: File
Location Name: filename_!DTRAIT!.log
Location Path: /somedir/
I have a task that is roughly as follows:
UPROC1: does something irrelevant
UPROC2: starts a background script that logs to file and exists
UPROC2 is Type: CMD
The command that is executed: /somedir/somescript.sh &> "$(date +/somedir/filename_%Y%m%d.log)"
UPROC3: uses Resource1 to parse the logfile from background script that was started in UPROC2.
The task starts at 10pm every day. Most days all works well.
Some days, say for example 1st October 2020, the following happens:
UPROC1 starts at 10pm 1st October 2020. UPROC1 takes unusually long time for some reason, say 3h.
UPROC2 starts at 1am 2nd October 2020. The OS in the command resolves to the following (Note "2nd october"): /dir/somescript.sh &> "$(date +/dir/filename_20201002.log)"
UPROC3 uses the Resource1 to parse the logfile. DTRAIT is resolved as "20201001", since that is when the task started. So UPROC3 tries to parse /dir/filename_20201001.log
Could you please give me suggestions on how to resolve this? Is is possible to change either the CMD in UPROC2 or Resource1 so that they will always point to the same logfile, in a neat way?
Best regads,
Steindor