Is there a way to create a temporary one-time only cron job from the command line? I'd like to have an egg-timer like function to open a terminal and do:
notify "time is up" 30
which would simply run this after 30 minutes:
zenity --info --text="time is up"
It seems easy enough for me to create, but I'm having a hard time believing no one has created something similar. Searching Ubuntu's repository for timing packages doesn't show anything. Has this been done before?
Use the at
command.
$ at now + 30 minutes
at> zenity --info --text="time is up"
at> ^D (press CTRL-D)
The time format is pretty flexible. Here are a bunch of examples.
$ at 11:45
$ at 0800 Friday
$ at 4pm + 3 days
$ at 9am tomorrow
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With