1

In GNU / Linux I can use the at command, among others, to schedule tasks something like this:

# at 07:07 
warning: commands will be executed using /bin/sh
at> To run the task
at> <EOT>

Until now without problems the doubt that arises to me is, Is it possible? And if it is, how can I make it take the system time and apply an operation, something like this:

#at get_system_time + 25_min

1 Answer 1

4

Yes you can - at has quite sophisticated date/time parsing capabilities1. In particular you can use now for the current time. To illustrate:

steeldriver@xenial-vm:~$ date
Wed Apr 12 10:56:53 EDT 2017

steeldriver@xenial-vm:~$ at now + 25 minutes
warning: commands will be executed using /bin/sh
at> echo "foo" > /home/steeldriver/at.out
at> <EOT>
job 20 at Wed Apr 12 11:21:00 2017

1 including teatime for example

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .