ContributionsMost RecentMost LikesSolutionsRe: How to stop running task after certain time i have scheduled job every day at eg. 2pm and after job started it should automatically stop at 5pm on that day, but next day it should be start at 2pm as per schedule Re: How to stop running task after certain time I tried this option but its not working How to stop running task after certain time How to stop running task after certain time I have scheduled job every day but want to stop that job after certain time(eg.after 4hrs) on every day. Re: Connect sftp through python script Hello i tried another code and still getting error “Reason: :42:4 Expected ; but found sftp let sftp = new Client(); ^ in ” // Ensure compatibility with both JDK 7 and 8 JSR-223 Script Engines try { load(“nashorn:mozilla_compat.js”); } catch(e) { } // Import the interface required by the Script snap. importPackage(com.snaplogic.scripting.language); // Import the serializable Java type we’ll use for the output data. importClass(java.util.LinkedHashMap); var impl = { input : input, output : output, error : error, log : log, execute : function () { this.log.info("Executing Transform Script"); while (this.input.hasNext()) { try { var Client = require(‘ssh2-sftp-client’); let sftp = new Client(); sftp.connect({ host: ‘hostname’, port: ‘22’, username: ‘user1’, password: ‘Password1’ }).then(() => { return sftp.list(‘/files/upd/’); }).then(data => { console.log(data, ‘the data info’); }).catch(err => { console.log(err, ‘catch error’); }); } catch (err) { var errDoc = new LinkedHashMap(); errDoc.put(“error”, err); this.log.error(err); this.error.write(errDoc); } } this.log.info(“Script executed”); }, cleanup : function () { this.log.info(“Cleaning up”) } }; var hook = new com.snaplogic.scripting.language.ScriptHook(impl); Re: Connect sftp through python script Hi Still i am facing issue to connect sftp server through script, can anyone help me out to connect to sftp server through javascript or python. Thanks in advance Mahesh Re: Connect sftp through python script i tried this but still getting error “Reason: _socket.error: [Errno 111] Connection refused in ” #from com.snaplogic.scripting.language import pysftp #from import ScriptHook from ftplib import FTP from com.snaplogic.scripting.language import ScriptHook from com.snaplogic.scripting.language.ScriptHook import * myHostname = “hostname” myUsername = “username” myPassword = “password” ftp = FTP(“hostname”,“22”) ftp.login(“username”,“password”)" Re: Connect sftp through python script Hi bojanvelevski, Thanks for reply , through read/write/directory browser snap, i am unable to connect to the ftp server (error :- “Unable to create filesystem object for sftp” , message:- “Failed to get SFTP session connected”) so trying to connect through script. Thanks Mahesh Connect sftp through python script Hello, Can you please help me to how to connect ftp server using python script in snaplogic Thanks Mahesh Re: How to use if else condition in xml generator snap Hello Koryknick Thank you for reply But still its not resolve my issue , my expectation is like this if xml input is case 1) if xml input is then output should be Case 2 ) if input is then output should be Case 3 ) if input is then output should be Thank you How to use if else condition in xml generator snap Hello Team how we can use if else condition in xml generator snap here is my query here either Expt have value or Sco have value not in both (Expt,Sco) i want to display case 1)if vatPer = 0.0 and if Expt tab have value then display Expt tab expecting like this case 2)if vatPer = 0.0 and if Sco tab have value then display Sco tab can you please help Thank you