Hey there,
I’m engaged on a CLI software utilizing the Cobra framework to implement the customers’ funds. The customers will set the funds quantity for various classes and when the spending quantity crosses, the person will get the alert notification via electronic mail that the person has spent cash out of limitation and this would be the fast message.
However right here is one other performance: the person may even set the alert time to ship the alert notification at a specific time and date.
All of these items are working effective however here’s a drawback that I wish to take care of.
When the person writes a command like app notify
, the appliance will begin operating like this
github.com/ibilalkayy/venture$ app notify
E-mail despatched at Date: 6/2/2024, Time: 7:00 PM
E-mail despatched at Date: 6/3/2024, Time: 7:00 PM
E-mail despatched at Date: 6/4/2024, Time: 7:00 PM
Once I cease operating this utilizing Ctrl+C
the appliance won’t ship the emails as a result of the command isn’t operating.
Now I need a function like docker during which the container runs even when the docker run command isn’t operating on the CLI or if the terminal is closed however the container is operating within the background.
I don’t know the way to obtain this factor. I might recognize it for those who might give me an concept about it.
Thanks!