Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method for running silently on Windows startup #110

Closed
Kpalsm opened this issue Mar 19, 2024 · 4 comments
Closed

Method for running silently on Windows startup #110

Kpalsm opened this issue Mar 19, 2024 · 4 comments

Comments

@Kpalsm
Copy link

Kpalsm commented Mar 19, 2024

When running the app I get a CMD window telling me:

SLF4J(W): No SLF4J providers were found.
SLF4J(W): Defaulting to no-operation (NOP) logger implementation
SLF4J(W): See https://www.slf4j.org/codes.html#noProviders for further details.

Trying to run the app silently in the background through Task Scheduler but I think this CMD window popping up with this warning is causing issues. Watchlistarr still runs fine and pulls my user's watchlists as intended after this warning, as long as this CMD window is left open, but when running through Task Scheduler the CMD window will pop up for a moment then exit. Originally this post was a small tutorial for running it this way, if I can get it working I'll repost it.

@Kpalsm Kpalsm changed the title Alternative method for running on Windows startup No SLF4J providers were found Mar 19, 2024
@Kpalsm
Copy link
Author

Kpalsm commented Mar 19, 2024

Found another method of running Watchlistarr silently in the background. Create the .bat file as detailed in the README then run the .bat file with a VBS script. To create the VBS script create a text file, name it what you like, and type into it:

Set WshShell = CreateObject("WScript.Shell")

cmds=WshShell.RUN("C:\path\to\watchlistarr\run.bat", 0, True)


Set WshShell = Nothing

Change the path to match the location of Watchlistarr on your machine. Change the file extension to .vbs, then put a shortcut to the VBS script in your startup folder. Now you don't see the CMD window.

@nylonee
Copy link
Owner

nylonee commented Apr 6, 2024

Great, glad you figured out a workaround

For future reference, the SLF4J errors can be safely ignored, it's basically telling you that the application doesn't know where to put the logs, but in your case since you're running it silently you don't care about where the logs go

@nylonee nylonee closed this as completed Apr 6, 2024
@SmoothMarx
Copy link

@Kpalsm I'm a newbie, so I just want to make sure I get it right, and others like me can get it:

  1. Create the .bat file mentioned in the Watchlistarr tutorial, Section "Starting Watchlistarr on Windows startup" (https://github.com/nylonee/watchlistarr/blob/main/CONFIGURATION.md#starting-watchlistarr-on-windows-startup). Save the File in the Watchlistarr directory (to make it easier)

  2. Create a NEW text document, with your code, and save it as a .vbs

  3. Add shortcut to .vbs file in Windows Startup Folder.

So the code of the .bat file should be:

@ECHO OFF
java "-Dsonarr.apikey=SONARR_API_KEY" "-Dradarr.apikey=RADARR_API_KEY" "-Dplex.token=PLEX_TOKEN" -Xmx100m -jar watchlistarr.jar

And the .vbs file should be:

Set WshShell = CreateObject("WScript.Shell")

cmds=WshShell.RUN("C:\path\to\watchlistarr\run.bat", 0, True)


Set WshShell = Nothing

Did I get this right?

@Kpalsm
Copy link
Author

Kpalsm commented Jul 22, 2024

@SmoothMarx As long as you modify the files as specified, that's correct. Change the bat file to include your sonarr, radarr and Plex API keys, then change the vbs file to include the path to the bat file as it is on your machine (on my PC I keep watchlistarr right on my C drive for simplicity so it's "C:\watchlistarr\run.bat" on mine), then it should work as I've described.

My PC's are currently packed up as I'm in the process of moving, so my troubleshooting ability is limited, but if you have any issues reply here again and I'll do my best to help.

@Kpalsm Kpalsm changed the title No SLF4J providers were found Method for running silently on Windows startup Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants