Search found 79 matches
- Fri Mar 22, 2024 5:37 pm
- Forum: Node.js scripting
- Topic: Warning in messages of Switch
- Replies: 4
- Views: 5274
Re: Warning in messages of Switch
In regards to debugging, is it possible to run the debug in Visual Studio Code on my mac, when Switch is running in my Windows server? I recommend trying VSCode Remote-SSH extension: https://code.visualstudio.com/docs/remote/ssh We've been using it for over a year now and it has made developing scr...
- Fri Dec 15, 2023 9:23 pm
- Forum: PitStop Server
- Topic: Migrate PitStop Server question
- Replies: 1
- Views: 8800
Re: Migrate PitStop Server question
Yes, you can activate a 30 day trial license on the new server directly from the software. Then you can import hotfolders and test them before activating the subscription on the new server.
- Fri Sep 08, 2023 1:51 pm
- Forum: Node.js scripting
- Topic: Logging of variable
- Replies: 6
- Views: 8977
Re: Logging of variable
As a workaround you can do the following: let replacements = ["%1", "%2", "%3", "%4", "%5", "%6", "%7", "%8", "%9"]; await job.log(LogLevel.Info, encodedURL, replacements); I tried to add this code to the scri...
- Fri Sep 08, 2023 1:42 pm
- Forum: Node.js scripting
- Topic: Using automation to update Scripts within Switch
- Replies: 3
- Views: 6721
Re: Using automation to update Scripts within Switch
I just posted an update to our process outline @mkayyyy referred to because we've made a couple of changes in the past year: viewtopic.php?p=15570#p15570
Still not perfect, but easier than before.
Still not perfect, but easier than before.
- Fri Sep 08, 2023 1:40 pm
- Forum: Node.js scripting
- Topic: Versioning scripts & Builds
- Replies: 7
- Views: 11840
Re: Versioning scripts & Builds
Since my last comment above, we've made a couple of changes: after Switch upgrades, the performance of script folders is mostly on par with packaged scripts so we are using script folders exclusively to be able to update scripts without restarting flows (naturally only if there are no changes to .s...
- Fri Sep 08, 2023 1:06 pm
- Forum: Node.js scripting
- Topic: Logging of variable
- Replies: 6
- Views: 8977
Re: Logging of variable
Hi, This is due to Switch reading the %2 from your string and interpreting that the log message includes a placeholder (%1, %2 etc) to replace like you could use it await jog.log(LogLevel.Info, 'Message about %1',[jobName]); <–– here the %1 is replaced with jobName variable. So you can get around th...
- Tue Mar 07, 2023 10:24 am
- Forum: Flows
- Topic: URL to a single Submit Point - Switch Web Services [SOLVED]
- Replies: 2
- Views: 933
Re: URL to a single Submit Point - Switch Web Services
Go to web portal –> Submit Jobs –> three dots in top left –> Manage Submit Points –> New URL and you can choose if it uses authentication or not.
- Mon Feb 13, 2023 1:30 pm
- Forum: Flows
- Topic: Archive hierarchy (offline paths)
- Replies: 7
- Views: 2649
Re: Archive hierarchy (offline paths)
Not to my knowledge. I have requested it years ago, but haven't heard from it since… It is a problem for us, too, and we currently only have a workaround where we have a separate flow for such output folders that can be offline. This way, the main output flow can always be activated and jobs going ...
- Mon Feb 13, 2023 9:24 am
- Forum: Flows
- Topic: Archive hierarchy (offline paths)
- Replies: 7
- Views: 2649
Re: Archive hierarchy (offline paths)
Not to my knowledge. I have requested it years ago, but haven't heard from it since… It is a problem for us, too, and we currently only have a workaround where we have a separate flow for such output folders that can be offline. This way, the main output flow can always be activated and jobs going t...
- Tue Jan 31, 2023 1:29 pm
- Forum: Flows
- Topic: Filter by file size
- Replies: 3
- Views: 2022
Re: Filter by file size
You can use the [Job.ByteCount] variable in a condition with variables so you have to convert MB to Bytes first (100 MB = 104875600 bytes):
- Thu Mar 31, 2022 9:50 am
- Forum: Flows
- Topic: Scheduled Flow Backup
- Replies: 6
- Views: 3001
Re: Scheduled Flow Backup
I ended up spending a lot of time a few years ago writing scripts for our version of switch-flow-auto-backup to create all the property sets folders and inject the required files for each flow into them. Since doing that we've been able to replicate what happens when you export flows manually Inter...
- Thu Mar 31, 2022 9:41 am
- Forum: Flows
- Topic: Scheduled Flow Backup
- Replies: 6
- Views: 3001
Re: Scheduled Flow Backup
Either this app auto-save-plus or these flows github.com/open-automation/switch-flow-auto-backup can handle backing up flows. We use the latter with some custom scripts added to back up to AWS S3 every week We also use a modified version of that switch-flow-auto-backup flows, but unfortunately the ...
- Sat Mar 12, 2022 6:11 am
- Forum: Node.js scripting
- Topic: job.log function doesn't run
- Replies: 6
- Views: 3428
Re: job.log function doesn't run
Oh, ok, yes that might be it. Can you log in the beginning of checkGs(), before Sheets.spreadsheets.values.get()? Have you tried running the script in debug mode ( https://www.enfocus.com/manuals/DeveloperGuide/SW/21.1/home.html#en-us/common/swscr/concept/co_swscr_nodejsscript_debugging.html ) so th...
- Fri Mar 11, 2022 11:01 pm
- Forum: Node.js scripting
- Topic: job.log function doesn't run
- Replies: 6
- Views: 3428
Re: job.log function doesn't run
Hi,
You should use await:
and earlier, before 2020 Fall, the parameter array was required so it should be included if you're using an older Switch:
I hope it helps.
You should use await:
Code: Select all
await job.log(LogLevel.Warning, 'Found in inventory')
Code: Select all
await job.log(LogLevel.Warning, 'Found in inventory', [])
- Thu Feb 10, 2022 9:57 pm
- Forum: Flows
- Topic: Inject Wildcard without Regex search?
- Replies: 2
- Views: 1710
Re: Inject Wildcard without Regex search?
But when this happens the incoming file is sent to Problem Jobs (and sends a generic Switch administrator alert email, which I would like to avoid ). If this is your only problem with Inject job, what if you just change the "Send alerts to" property of the flow's Problem Job folder to 'No...