H
H
Harbid Abu Marhamedoff2018-12-16 05:06:34
linux
Harbid Abu Marhamedoff, 2018-12-16 05:06:34

How to limit the running time of programs in Linux?

I would like a program that would limit the operating time of some programs on the computer according to the schedule. For example, in the middle of the week, the child is left alone at home and can stick to the computer, uncontrollably, forgetting about everything. I would like to limit the time of work or individual programs, or in total their groups. For example, on Monday from 8 a.m. to 5 p.m., you can only run browsers for 30 minutes and games for 30 minutes, similarly on Tuesday - from 8 a.m. to 2 p.m., etc. After 30 minutes, if the browser starts, then killall -TERM terminates. Outside of the described time, everything works without restrictions. Has anyone else seen this, or can you help write if not?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Saboteur, 2018-12-16
@saboteur_kiev

That is, are you satisfied if the screen suddenly closes for a child while he finishes reading Wikipedia to learn something at home, or during the game the game crashes without saving?
IMHO such draconian methods disfigure the psyche, since "something left unfinished" is imposed from above and is considered normal.
Do the usual monitoring of what processes were running, and limit it in the evening, when you come home and check, by banning the use of the computer for a couple of days at all or push-ups.

B
Boris Syomov, 2018-12-16
@kotomyava

Spending this time not on searching for the implementation of the ban, but on helping to find a good hobby not at the computer, will be much more productive.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question