Append date and time to the std_out_file in jil - date

I have a job in Autosys. I want new log file to be created for its every run. Hence, I want to append date and time to the logfile name I am giving in std_out_file. Is there any way to do this other than creating a global variable and then updating it everyday using another autosys job?

There is no default to do this. You can use this:
\\logpath\%auto_job_name%.%autorun%.OUT.txt
This will create a run number and it will not overwrite the logs even if there are multiple runs a day. You can use the date/time that is when the file is created for sorting.

Related

How to get job submission date from IBM workload scheduler (IWS)

I use IWS to submit job but I want to get job submission date from IWS and assign it into the variable. Then, I want to use the variable parameter to pass date thru batch file.
I don't know how to do it. Can anyone suggest me about this?
If you submit a job stream (even with a single job), the schedTime of the job stream is the by default the submission time.
From basic UNIX/Windows jobs, on FTA or dynamic agents, you can retrieve the schedTime with the environment variables UNISON_SCHED_IA (e.g 202210260856), or if only need the date with UNISON_SCHED_DATE (e.g. 20221026).
If you are using an Executable job type on a Dynamic agent you can get the same value with ${tws.job.iawstz} variable.

UiPath Orchestrator Triggers - Cron Expression For specific day of month or next working day if not a working day

I've currently got this Cron expression that I'm using to trigger a process in UiPath Orchestrator:
0 0 15 21W * ? *
Runs on the closest working day to the 21st of each month at 3pm.
However I need it to run on the next working day at 3pm if the 21st is a non working day.
Tried searching for an answer and nothing quite fit the brief.
I used this website to build my expression (which is a great tool) but it only had an option for 'nearest day' and not next working day given a specific day of month: https://www.freeformatter.com/cron-expression-generator-quartz.html
As you don't need the nearest day, you can't use the functionality of Orchestrator cronjob. I would recommend creating a wrapper process as follows:
Create a new process, let's call it StartJobByCheckingDate
Now create a trigger that starts StartJobByCheckingDate each day at 3pm
So that process is now your manager of your desired process
Now we need to check if it is the 21th day
Here you have different ways to solve it
You could create a DataTable or even a file in the StartJobByCheckingDate process, that contains all the different days where your desired process should be fired (but this is very manual, you might not want to update this every year, so this might not be the smartest but the easiest solution)
The other idea is to check if the current day is the 21th day. If so check if it is Saturday/Sunday (non-working day).
If true: you could now create a empty dummy file somewhere that tracks that the 21th was a non-working day, and the next day you check that file existing, if it exists you check the current day to be a working day, and if so you delete the file again and start your desired process
If false: just start your desired process directly
I think 2. idea would be that best. Sure you have 365 jobs runs/year. But when you keep that helper process smart this will just be seconds.
Another idea instead of using the dummy file, would be to use Entities. Smarter but need some more time to get familiar with.
We have (had) the exact same issue. Since UiPath doesn't offer a feasible solution out of the box, we will work around the restriction using the following strategy: We trigger the actual job daily, considering a custom-built, static NonWorkingDay-list that will just suppress the execution of the robot every day we don't want it to run.
These steps are needed:
Get a list with of all known bank holidays, saturdays and sundays until 2053 or so...
Build a the static exclusion-list using a script that does something like this (pseudocode. I will update the answer once we have actually implemented the solution):
1. get all valid execution dates
loop through every 28th of the month until end of 2053
if the date is in the bankHolidayList then
loop until the next bankDay is found
add it to the list of valid ExecutionDates
else
add the date to the validExecutionDate-list
2. build exclusion-list
loop through every day until end of 2053
if the date is not in the validExecutionDate-list
add it to the exclusionDate-list
Format the csv accordingly and upload it to the orchestrator tenant as a NonWorkingDay-List
Update your trigger to run daily at your desired time, using the uploaded NonWorkDay-Calendar
While the accepted answer will surely work as well, we prefered to go with this approach because having a separate robot that does nothing but executing a UiPath trigger just doesn't seem right to me. With this approach we have no additional code that we potentially need to maintain.
In my oppinion not having a solution for this concern out of the box is a lack of feature that UiPath will (hopefully) fix until end of 2053 ;-)
Cheers
You can configure your trigger to launch oftener, then manage dates at init of your process, but you must set up a list of "holydays" or check in some way.
Also you can use the calendar option of orchestrator (+info)

How to process only the most recent file in a directory using Mirth Connect?

I'm attempting to create a channel designed to take a binary file from an sFTP site and transfer it to a second sFTP site. The source site updates their files on Friday, so I'm creating the channel to run every Sunday. The main issue is that I want to leave processed files in the source directory, and only process files that have been deposited between the weekly channel runs.
Is something like this doable in Mirth Connect, and what is the most efficient way to accomplish it?
In the Source Map is a variable named fileLastModified, which holds the "last modified date of the file, as an epoch time in milliseconds". You should be able to use this as a condition for Destination Set filtering.
In the Source Transformer, add a Destination Set Filter step. Remove all destinations on the condition of fileLastModified being older than a week, or older than the time elapsed since the last time the channel ran. You can track the last time the channel ran by storing that value in the globalChannelMap, if you need to.

Talend: How to copy the file with modified as of today

I have a job in Talend which will connect to a ftp folder and look for the files eg:ABCD. This file is created everyday and its placed in the ftp path and i need to move this files to some other folder. I'm new to talend and Java. Could you please help me how to move this file when and only the file last modified date as of the job run date.
You can use tFTPFileProperties to obtain the properties of the remote file, then in a javarow access those properties. You can then compare to current date either in the tJavaRow and stick the results in a global variable or put the date in a global variable. You then use an IF trigger to join to the tFTPGet component.
The IF trigger will either check the results of your compare, or do the compare. It will only execute the FTP Get if true.
This shows overall job structure, including the fields made available from the file properties:
This shows how to obtain the datetime of the remote file. This is where you will need to stick it in a global variable (code for that is not shown) so you can use it in your IF trigger code.
This shows the datetime of the remote file when the job is run.
This points you in the right direction but you will need to still do some work. You will need to do the compare in your IF trigger and know how to compare dates.

Is there a way to set an automatic closing date for a job position in Odoo?

I am fairly new to Odoo development and am now trying to set an automatic closing date for a new job position being created. I can't find this feature.
What would be the best approach to achieve this?
You can do it in two ways.
1) using onchange, suppose job opening date is 30-jun-2015, and you want to close the job after 10 days, then using onchange calculate the value and populate it in closed date
2) Using Openerp crons, you can configure a cron, and in the cron method apply your required conditions, and calculate the closing date, and set the interval for the cron,
** Note that by using functional field, the function will be called every time the record is being accessed.