How to set a timer? [Solved]
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Topics in this forum are automatically closed 6 months after creation.
-
- Level 1
- Posts: 23
- Joined: Fri Feb 12, 2021 7:02 am
How to set a timer? [Solved]
I need to set a timer using the terminal, is there a way?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
- freshminted
- Level 4
- Posts: 271
- Joined: Fri May 01, 2020 12:26 am
Re: How to set a timer?
Try the "at" command? You may have to install it first.
Complete World Domination within five years.
Re: How to set a timer?
Do you mean a cron job?
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
-
- Level 1
- Posts: 23
- Joined: Fri Feb 12, 2021 7:02 am
Re: How to set a timer?
I am totally a noob, so I just want linux to remind me after say, 10 mins
Re: How to set a timer?
You can use the sleep command. It uses seconds, so 10 minutes would be 600 seconds.
You can get fancy and add a sound or other notification.
You can get fancy and add a sound or other notification.
Code: Select all
sleep 600 && paplay --volume 60000 /usr/share/sounds/freedesktop/stereo/phone-incoming-call.oga
Last edited by Welcome on Mon Feb 22, 2021 9:57 am, edited 1 time in total.
Re: How to set a timer?
You can install Gnome Clocks from the software manager or simply open terminal and paste this commandI just want linux to remind me after say, 10 mins
Code: Select all
sudo apt install gnome-clocks
-=t42=-
Re: How to set a timer?
Since this thread is in "Scripts & Bash", maybe OP is looking for a command line solution. OP did originally say...
I need to set a timer using the terminal, is there a way?
Re: How to set a timer?
This maybe a little complex, and doesn't include any error handling, but if you need a notification at a specific date and time, and must use a one-line bash command:
You'd need to adjust the date and time in the command, of course.
Code: Select all
sleep $(( $( date --date="27 Feb 2021 09:35:00" +%s ) - $( date +%s ) )) && paplay --volume 60000 /usr/share/sounds/freedesktop/stereo/phone-incoming-call.oga
- freshminted
- Level 4
- Posts: 271
- Joined: Fri May 01, 2020 12:26 am
Re: How to set a timer?
This actually looked useful, so I installed it usingt42 wrote: ⤴Mon Feb 22, 2021 9:55 am You can install Gnome Clocks from the software manager or simply open terminal and paste this commandCode: Select all
sudo apt install gnome-clocks
14-57-30.png
Code: Select all
sudo apt install gnome-clocks
Complete World Domination within five years.
Re: How to set a timer?
It's version 3.36.2 from LM 20.1 . In fact, I like the old version more, it was simple just enough.freshminted wrote: ⤴Mon Feb 22, 2021 10:37 pm But I got a version without all the timer presets and looks like it's pretty ancient, version 3.28. What version are you running?
-=t42=-
-
- Level 1
- Posts: 23
- Joined: Fri Feb 12, 2021 7:02 am
Re: How to set a timer?
I needed a bash script which I can change anytime so thanks.
Re: How to set a timer? [Solved]
Read about:
Cron
Anacron
Systemd timers
Maybe then you will know which one you want to use.
and maybe then you will have more questions.
Because we know too little about your project.
Cron
Anacron
Systemd timers
Maybe then you will know which one you want to use.
and maybe then you will have more questions.
Because we know too little about your project.
Re: How to set a timer? [Solved]
Read also about
1. What is the difference between & and &&
2. About sleep command
1. What is the difference between & and &&
2. About sleep command