Bash Run command for certain time?

Here are some bash scripts and a program called timelimit which may solve your problem.
Kill process after it’s been allowed to run for some time

EDIT: I think I found a better solution. Try using the timeout program. From the man page:
“timeout – run a command with a time limit”. For example:

timeout 5s sleep 10s

It basically runs your command and after the specified duration it will kill it.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)