Is there a way to shut down a program after a set amount of time?
For example: Start Seamonkey and have it close after one hour.
This does not work.
Code:#!/bin/bash # Ubuntu_Mate 18.04 LTS # # seamonkey sleep 1 killall seamonkey
Is there a way to shut down a program after a set amount of time?
For example: Start Seamonkey and have it close after one hour.
This does not work.
Code:#!/bin/bash # Ubuntu_Mate 18.04 LTS # # seamonkey sleep 1 killall seamonkey
Last edited by raleigh3; July 19th, 2018 at 09:03 PM.
Ubuntu Mate 18.04 Bionic and Ubuntu Mate 20.04
Mate Desktop
For a start, that script would kill it only 1 second after starting it, not one hour as you say you want.
From man sleep:
Have you triedsleep NUMBER[SUFFIX]...
Pause for NUMBER seconds. SUFFIX may be 's' for seconds (the default), 'm' for minutes, 'h' for hours or 'd'
for days.
or just use a simple compound commandCode:#!/bin/bash seamonkey sleep 1h; killall seamonkeyCode:seamonkey & sleep 1h; killall seamonkey
Code-tags --- Boot-Repair --- Grub2 wiki & Grub2 Basics --- RootSudo --- Wireless-Info --- SolvedThreads --- System-Info-Script
Thanks. Both methods worked.
Ubuntu Mate 18.04 Bionic and Ubuntu Mate 20.04
Mate Desktop
Bookmarks