0

Have been using the Juicebox Job Scheduler to run scheduled tasks on my Windows Server box for more than a year. However I need to manually start the scheduler each time I reboot as the scheduler is a Java application. What's the easiest way to make a Java application run as a Windows service? Took a look at commons-daemon but it looks pretty complicated to set up, requiring me to create a Java class even? I found that Windows services are simply a set of registry keys but I couldn't work out how to specify an executable with parameters. I tried this on my test Windows desktop:

c:\Program Files\java\jre7\bin\java -jar C:\Users\Cole B\Desktop\juicebox.war

It didn't work, couldn't access the scheduler web interface after starting a service with that ImagePath definition.

The scheduler is not a desktop GUI application so that should help.

Would it simply be easier to do this if I ran it on Linux instead?

2 Answers 2

0

Since version 1.2.10 Juice Box was available as a Windows Installer download. The installer takes care of registering the scheduler as a service so that you don't have to manually start the scheduler.

You can upgrade from your current version by making a backup of the *.db Juice Box files. Then install version 1.2.10 and copy those *.db files into the C:\Program Files\Juice Box Job Scheduler\commons-daemon folder. Make sure to do the file copy while the scheduler service is not running, otherwise the files will be locked.

Windows Installer download for version 1.2.10: http://www.juiceboxscheduler.com/downloads/bin/juicebox.msi

0

Is there a reason the native Windows Task Scheduler isn't sufficient for your scheduled tasks?

Windows services are more than just registry keys pointing to an executable. In particular, the executable must be able to receive RPC communication from the Service Control Manager to be able to do things like Start, Stop, etc. There are a variety of tools out there to "wrap" non-native service executables. But they can be finicky depending on the application being wrapped. Google for srvany or FireDaemon if you're interested.

The question remains though. Why not just use the native Task Scheduler?

2
  • When I looked into this a year ago it was too cumbersome to use the native Task Scheduler to set up chained/multi-step tasks. Was much easier to use Juice Box or something similar. FireDaemon looks promising and is not expensive. Will check it out.
    – Cole Bloom
    Sep 28, 2017 at 21:38
  • Fair enough. FireDaemon is definitely the most polished solution for this. Sep 28, 2017 at 21:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .