Hey there,
I am working on a CLI application using the Cobra framework to implement the users’ budget. The users will set the budget amount for different categories and when the spending amount crosses, the user will get the alert notification through email that the user has spent money out of limitation and this will be the immediate message.
But here is another functionality: the user will also set the alert time to send the alert notification at a particular time and date.
All of these things are working fine but here is a problem that I want to deal with.
When the user writes a command like app notify
, the application will start running like this
github.com/ibilalkayy/project$ app notify
Email sent at Date: 6/2/2024, Time: 7:00 PM
Email sent at Date: 6/3/2024, Time: 7:00 PM
Email sent at Date: 6/4/2024, Time: 7:00 PM
When I stop running this using Ctrl+C
the application will not send the emails because the command is not running.
Now I want a feature like docker in which the container runs even if the docker run command is not running on the CLI or if the terminal is closed but the container is running in the background.
I don’t know how to achieve this thing. I would appreciate it if you could give me an idea about it.
Thank you!