Search found 79 matches

by patej
Fri Mar 22, 2024 5:37 pm
Forum: Node.js scripting
Topic: Warning in messages of Switch
Replies: 4
Views: 961

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...
by patej
Fri Dec 15, 2023 9:23 pm
Forum: PitStop Server
Topic: Migrate PitStop Server question
Replies: 1
Views: 3680

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.
by patej
Fri Sep 08, 2023 1:51 pm
Forum: Node.js scripting
Topic: Logging of variable
Replies: 6
Views: 6376

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...
by patej
Fri Sep 08, 2023 1:42 pm
Forum: Node.js scripting
Topic: Using automation to update Scripts within Switch
Replies: 3
Views: 4895

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.
by patej
Fri Sep 08, 2023 1:40 pm
Forum: Node.js scripting
Topic: Versioning scripts & Builds
Replies: 7
Views: 9466

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...
by patej
Fri Sep 08, 2023 1:06 pm
Forum: Node.js scripting
Topic: Logging of variable
Replies: 6
Views: 6376

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...
by patej
Tue Mar 07, 2023 10:24 am
Forum: Flows
Topic: URL to a single Submit Point - Switch Web Services [SOLVED]
Replies: 2
Views: 811

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.
by patej
Mon Feb 13, 2023 1:30 pm
Forum: Flows
Topic: Archive hierarchy (offline paths)
Replies: 7
Views: 2403

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 ...
by patej
Mon Feb 13, 2023 9:24 am
Forum: Flows
Topic: Archive hierarchy (offline paths)
Replies: 7
Views: 2403

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...
by patej
Tue Jan 31, 2023 1:29 pm
Forum: Flows
Topic: Filter by file size
Replies: 3
Views: 867

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):
Image
by patej
Thu Mar 31, 2022 9:50 am
Forum: Flows
Topic: Scheduled Flow Backup
Replies: 6
Views: 2815

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...
by patej
Thu Mar 31, 2022 9:41 am
Forum: Flows
Topic: Scheduled Flow Backup
Replies: 6
Views: 2815

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 ...
by patej
Sat Mar 12, 2022 6:11 am
Forum: Node.js scripting
Topic: job.log function doesn't run
Replies: 6
Views: 3176

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...
by patej
Fri Mar 11, 2022 11:01 pm
Forum: Node.js scripting
Topic: job.log function doesn't run
Replies: 6
Views: 3176

Re: job.log function doesn't run

Hi,

You should use await:

Code: Select all

await job.log(LogLevel.Warning, 'Found in inventory')
and earlier, before 2020 Fall, the parameter array was required so it should be included if you're using an older Switch:

Code: Select all

await job.log(LogLevel.Warning, 'Found in inventory', [])
I hope it helps.
by patej
Thu Feb 10, 2022 9:57 pm
Forum: Flows
Topic: Inject Wildcard without Regex search?
Replies: 2
Views: 1614

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...