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

CLI app as daemon? #25

Open
1 of 3 tasks
bmarwell opened this issue Aug 9, 2019 · 7 comments
Open
1 of 3 tasks

CLI app as daemon? #25

bmarwell opened this issue Aug 9, 2019 · 7 comments

Comments

@bmarwell
Copy link

bmarwell commented Aug 9, 2019

Task List

  • Stacktrace (if present) provided
  • Example that reproduces the problem uploaded to Github
  • Full description of the issue provided (see below)

Steps to Reproduce

  1. Create a CLI app, with picolli
  2. Create a scheduled bean (a bean with any @scheduled annotation).
  3. Run the app

Expected Behaviour

The app should run as daemon.

Actual Behaviour

The app does not find a http server and quits.

Environment Information

  • Operating System: Any, but Linux
  • Micronaut Version: 1.2.0
  • JDK Version: 11 (also tested 1.8), both openjdk-openj9.

Example Application

I think it's easy enough to reproduce.

Well If I leave out Picolli and add http-server-netty as a dependency, it works as expected. But in this case, I'd like to see CLI application which I can start using picolli CLI and the scheduler gets configured through picolli.

@bmarwell
Copy link
Author

Hi @graemerocher

This was not a question. It was a missing feature.

@graemerocher graemerocher reopened this Feb 13, 2020
@graemerocher graemerocher transferred this issue from micronaut-projects/micronaut-core Feb 13, 2020
@graemerocher
Copy link
Contributor

I think you may need the micronaut-runtime dependency to schedule the jobs

@bmarwell
Copy link
Author

Thanks, hadn't found it in the docs when I opened this issue. I'll look it up and will give feedback soon.

@bmarwell
Copy link
Author

@graemerocher the application will just shutdown if I do not add a while(true) loop.

@prshnt
Copy link

prshnt commented Mar 10, 2023

I have a similar issue now, was this ever followed up or did you find a solution?

@remkop
Copy link
Contributor

remkop commented Mar 10, 2023

@prshnt I interpreted the suggested solution to be adding a while (true) sleep(1000); loop to make sure the main thread never dies.

@prshnt
Copy link

prshnt commented Mar 13, 2023

@remkop ah okay. thanks.

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

4 participants