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

Start or Stop Option #7

Open
patoperpetua opened this issue Aug 23, 2019 · 1 comment
Open

Start or Stop Option #7

patoperpetua opened this issue Aug 23, 2019 · 1 comment

Comments

@patoperpetua
Copy link

Hello, I don't know if there is a feature to stop a container. My idea is to start a container at certain time and stop it at another. I can start a container a certain time using cron but i cant find the way to stop it.

By the way, really cool your tool, I have it setup in one of my servers

@bazarnov
Copy link

bazarnov commented Feb 3, 2021

Hi, you can play with cron jobs with " not to start the cron job " at certain time. Give more information about the execution period you need or try to play with this resource in order to have strict cron job execution, a.k.a: "Start at this time, and not start at that" regarding your task of course.

https://crontab.guru/

EXAMPLE:
NOW: 2021-02-03 13:28
CRON SCHEDULE: 0 */2 1-14 * *
CRON DESCRIPTION: At minute 00, past every 2nd hour on every day-of-month, starting from 1 through 14th.
NEXT CRON JOB: at 2021-02-03 14:00:00
then at 2021-02-03 16:00:00
then at 2021-02-03 18:00:00
then at 2021-02-03 20:00:00
then at 2021-02-03 22:00:00
and so on till 2021-02-14 00:00:00 comes.

So, theoretically you can start and stop the container using cron jobs at certain time as you need.
Hope that helps.

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

2 participants