This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Executing Script in Schedule Job

Dear Members,

I need technical suggestion on executing Script in Schedule Job. We are running script scheduling for specific commands on weekly basis for all network devices.

We test the script and results save as Text file but script results for all Network Nodes are saving in single Text file.

Can we achieve following results:

1: Can we run single scripts on all network nodes and results save in separate Test file for each node rather than in as single text file?

2: Currently name of the text file save as IP Address, Date, time (10.10.10.10.28-04-13.11:50.txt).

3: Can we save the file as device name? We need variable to define the name in text file. Please assist for name variable?

This is common issue on executing Script Scheduling so please need your immediate assistance.

Thanks,

  • I believe you can get the job to save the results from each node in an individual file.  The way to do this is actually under the "Notifications" tab when scheduling the job.  If you select "Save Results To File", it will prompt you by default to save the files to

    C:\Program Files (x86)\SolarWinds\Orion\NCM\Jobs\${AgentIP}-${Date}-${Time}.txt

    I recommend creating a unique subdirectory, as by default this will put all those files in with your jobs and job logs.  I also believe you can choose to use the variable ${SysName} instead of ${AgentIP}  so it might look something like this:

    C:\Program Files (x86)\SolarWinds\Orion\NCM\Jobs\INSERT UNIQUE JOB NAME HERE\${SysName}--${AgentIP}-${Date}-${Time}.txt

    When the job completes there should be a unique text file for each node this job was run upon.


  • Dear,

    100% Perfect solution for this script scheduling.

    Cheers,

  • Dear Andy H,

    I worked on your suggested solution and its working very fine but

    it possible to put all these

    Script files separately in each folder with device name? Because

    when you have 200 network nodes and all script in single file than it is very

    difficult to find specific file in case you required it.

    So please suggest the variable which can create separate folder

    same as device name and save result file in that Folder.

    Thanks for your support and valueable feedback.

    Date: Tue, 30 Apr 2013 18:47:13 -0500

    From: solarwindscommunityteam@communications.solarwinds.com

    To: jahanzaibamin@hotmail.com

    Subject: Re: - Executing Script in Schedule Job

    thwack

    Executing Script in Schedule Job

    created by andy h in Network Configuration Manager - View the full discussion

    I believe you can get the job to save the results from each node in an individual file. The way to do this is actually under the "Notifications" tab when scheduling the job. If you select "Save Results To File", it will prompt you by default to save the files to C:\Program Files (x86)\SolarWinds\Orion\NCM\Jobs\$-$-$.txt I recommend creating a unique subdirectory, as by default this will put all those files in with your jobs and job logs. I also believe you can choose to use the variable $ instead of $ so it might look something like this: C:\Program Files (x86)\SolarWinds\Orion\NCM\Jobs\INSERT UNIQUE JOB NAME HERE\$--$-$-$.txt When the job completes there should be a unique text file for each node this job was run upon.

    Reply to this message by replying to this email -or- go to the message on thwack

    Start a new discussion in Network Configuration Manager by email or at thwack

  • Dear Andy H,

    I worked on your suggested solution and its working very fine but it possible to put all these

    Script files separately in each folder with device name? Because when you have 200 network nodes and all script in single file than it is very difficult to find specific file in case you required it.

    So please suggest the variable which can create separate folder same as device name and save result file in that Folder

  • Dear Andy H,

    I worked on your suggested solution and its working very fine but it possible to put all these  Script files separately in each folder with device name? Because

    when you have 200 network nodes and all script in single file than it is very difficult to find specific file in case you required it.

    So please suggest the variable which can create separate folder same as device name and save result file in that Folder.

    Thanks for your support and valuable feedback.

  • I am not sure that this job is capable of creating those folders.  It appears that it is only able to use the variables in the filename itself.  I have tried to get it to generate a new folder by using \${sysname}\.... however this does not appear to work.  Sorry I'm not sure what else to suggest.  You might want to open a ticket and pose this as either a bug or a feature request.

  • FormerMember
    0 FormerMember in reply to andy_h

    I'm trying to do much the same thing but I run into a problem when trying to set up the scheduled job.

    In the "Notifications" tab, when specifying the pathname for saving the file, as soon as I put in a variable it can no longer validate the path and it won't let you go any further in the process. The various folders already exist but it seems you can't validate correctly with a variable rather than a defined folder name in the path.

    Does anyone have any experience with this and managed to get it work as outlined above?

    Thanks in advance.

  • Hi snowy,

    NCM can't validate the path if it contains a variable -- the value can be node-specific.

    Regards,

    Jiri