Command

  • 28 Oct

    How to execute script on temp folder

    How to execute script on temp folder

    Q: I would like to change the content of a file located on an FTP. I am trying to do so with a python script executed thanks to command option. So, my source is an FTP, and the destination is the same FTP. Is there a way to execute the command script on the temp folder so it would follow these steps :

    1. Move file from FTP to AppData\Local\Temp…
    2. Execute script on the moved file.
    3. Move the edited file to the same FTP.

    I succeed doing it with 2 rules :

    Rule 1 :

    1. Move file from FTP to a local folder.
    2. Execute script on the moved file.

    Rule 2 :

    1. Move file from local folder to the same FTP.

    Thank you!

    A:  It should be possible in one Rule.

    Your Destination setup will have 2 Destination entries. In my example below the second destination is WIN, in your case it would be FTP.
    In the Command setup you can use parameters like %SFP%SFN
    These parameters will point to the Source file located in the temporary folder after download from FTP as Source.

    limagito file mover script on Temp folder

    It is a good idea to adjust the Function setup. We changed the ‘Destination Options’ to ‘Exit Cyclus on Error’. So if the command in the first entry fails it will not move the file to the FTP server. It will retry the Command during the next scan.

    limagito file mover function exit cyclus on error

    #command #filetransfer #filemanagement

    If you need any help with this ‘execute script on Temp folder’ option, please let us know.

    Best Regards,

    Limagito Team

    By Limagito-Team Command ,
  • 23 Oct

    How to use the new command line tools method

    How to use the new command line tools method

    In version v2023.10.23.0 we added a second method to execute Command Line Tools.

    This second method is available with:

    • CMD as Source
    • CMD as Destination
    • Command option (Moving Rule Menu)

    This new method is also the default in our newly added Rule Events Command option.

    The new Command method has two new options:

    • Max Time After Beginning (seconds): If you want the process to stop by itself after X seconds of activity, use the property ‘Max Time After Beginning’.
    • Max Time After Last Output (seconds): If you want the process to stop after X seconds without an output, use the property ‘Max Time After Last Output’.

    Both options will prevent our File Mover Rule from hanging due to incorrect behavior of the Command Line Tool.

    new command line tools

    RunTime Log Result example:

    limagito file mover runtime log

    #cmd #filetransfer #filemanagement

    If you need any help with this ‘new command line tools’ option, please let us know.

    Best Regards,

    Limagito Team

    By Limagito-Team Command ,
  • 23 Oct

    How do I use Zabbix to monitor the status of my tasks

    Q: How do I use Zabbix to monitor the status of my tasks.

    What: We are looking to monitor some of our Limagito tasks inside Zabbix using the rule event in Limagito.

    Why: Example, we have an SLA for a specific service, we monitor the hardware services etc in Zabbix

    Some of those services depends on file being moved by LIMAGITO.

    How: I need to execute a CMD with parameter on event success and on event fail so I can communicate to my Zabbix server.

    Could you give me some assistance as to how I can run an .exe with parameters whenever a task is successful/unsuccessful?

    A: In version v2023.10.23.0 we added our ‘Command Line’ option to the Rule Events. This should make it possible to use any Command Line tool like the one from Zabbix (zabbix_sender.exe).
    limagito file mover rule events
    Example for the ‘On Success’ event. We have no idea about the zabbix_sender Command Line tool parameters, this is just an example from their website.
    You’ll need to enable the ‘On Error’ event too and add the Command Setup for this event also (with other zabbix_sender parameters).
    We have set the ‘Max Time After Beginning’ to 30 seconds. This prevents the command from hanging in case there is an issue with the command Line tool.
    limagito file mover use Zabbix to monitor the status
    Maybe it is a good idea to enable ‘Success event memory’ and ‘Error event Memory’. This way the event will only be triggered when the status changes between Success  <> Error and not with every Success and Error event.
    limagito file mover rule events setup

    #zabbix #cmd #filetransfer #filemanagement

    If you need any help with this ‘use Zabbix to monitor the status’ request, please let us know.

    Best Regards,

    Limagito Team

    By Limagito-Team Command Events , ,
1 2 3 4
SEARCH