when I type
echo %DATE:~4%I receive the response
11/07/2022
the cybAgent command returns
CA Workload Automation Agent for:
Windows 64-bit
11.4, Service Pack 01, Maintenance Level 0, Build 1933
Functionality:
config, ftp, management, snmp off
filebrowser, filemon, objmon, router, runner on
I could not find the autoflag command
Original Message:
Sent: Nov 07, 2022 02:12 PM
From: Gene Howard
Subject: How to add current date to log file path in JIL
I need a little more information.
What version of autosys are you using?
autoflag -a
what version of the agent are you using?
cybAgent -vv
What does the below command show when you log into the agent machine as the job owner and run this at a command prompt?
echo %DATE:~4%
or
echo %DATE:~-10,2%-%DATE:~-7,2%-%DATE:~4%
------------------------------
Gene Howard
Principal Support Engineer
Broadcom
Original Message:
Sent: Nov 07, 2022 01:57 PM
From: Gerald Britton
Subject: How to add current date to log file path in JIL
So I tried the approach in the article, set the log spec to this:
std_out_file: <servername>\autosys_log\%DATE:~10,4%%DATE:~7,2%%DATE:~4,2%-%AUTO_JOB_NAME%-%AUTORUN%.std.out
but after the test run, all I got in the log directory is a file named:
%DATE
Can you spot the error in my syntax? I must have missed something.
Original Message:
Sent: Nov 07, 2022 08:15 AM
From: Gene Howard
Subject: How to add current date to log file path in JIL
Please see the below KB articles that should help you out here
Using Environment Variables/Global Variables in WAAE Job Log Filenames
https://knowledge.broadcom.com/external/article?articleId=10791
Adding a date time stamp to a standard out file name in Windows
https://knowledge.broadcom.com/external/article?articleId=32782
------------------------------
Gene Howard
Principal Support Engineer
Broadcom
Original Message:
Sent: Nov 04, 2022 03:35 PM
From: Gerald Britton
Subject: How to add current date to log file path in JIL
In my autosys jil (Windows), I have logging set up like this:
std_out_file: <servername>\autosys_log\%AUTO_JOB_NAME%-%AUTORUN%.std.out
I want to add the current date to the path, so e.g. for today that would be:
std_out_file: <servername>\autosys_log\2022-11-04\%AUTO_JOB_NAME%-%AUTORUN%.std.out
How can I get that to work? I need some way of dynamically inserting the current date in the output path.