timing non-repetative tasks

tasks that are just run once but at a certain time or date

uname -a; # tested with
Linux debian 3.16.0-4-686-pae #1 SMP Debian 3.16.43-2 (2017-04-30) i686 GNU/Linux

at 14:45
touch create_this_file
# Ctrl+D to quit at
at> <EOT>
job 1 at Thu May 18 14:45:00 2017 <- task is scheduled

at 14:47
touch create_another_file
# Ctrl+D to quit at

at now + 5 minutes
touch this_file_will_be_created_in_five_minutes
# Ctrl+D to quit at

at 11:00 july 2
touch this_file_will_be_created_on_this_date
# Ctrl+D to quit at

atq; # list all scheduled jobs
4       Sun Jul  2 11:00:00 2017 a root
1       Thu May 18 14:45:00 2017 a root
2       Thu May 18 14:47:00 2017 a root

service atd start
root@debian:~# service atd status
● atd.service - Deferred execution scheduler
   Loaded: loaded (/lib/systemd/system/atd.service; enabled)
   Active: active (running) since Thu 2017-05-18 10:19:31 CEST; 1h 9min ago
     Docs: man:atd(8)
 Main PID: 622 (atd)
   CGroup: /system.slice/atd.service
           └─622 /usr/sbin/atd -f

update-rc.d atd enable; # make service start on boot

manpages:

atd.man.tx

at.man.tx

batch.man.txt

links:

https://wiki.debian.org/Daemon#Enable.2Fdisable_daemons

admin