How the command "at" works?

Karl Auer kauer at biplane.com.au
Sat Aug 6 14:31:25 UTC 2016


On Sat, 2016-08-06 at 06:36 -0500, Peng Yu wrote:
> Do you know any alternative job scheduler to 'at' with the same
> fuction but written in a scripting language?

I just downloaded the source and made a version of at/atd that uses
bash. It took about ten minutes; I just blindly substituted "/bin/bash"
wherever I found "/bin/sh" in the sources :-)

   apt-get source at
   sudo apt-get build-dep at
   cd at-3.1.18
   ./configure
   [edit at.c and atd.c]
   make

I did NOT run "make install". Instead:

   sudo mv /usr/bin/at /usr/bin/at.org
   sudo mv /usr/sbin/atd /usr/sbin/atd.org
   sudo cp at /usr/bin/at
   sudo cp atd /usr/sbin/atd
   sudo chown daemon:daemon /usr/bin/at
   sudo ug+s /usr/bin/at

Then:

   sudo systemctl stop atd
   sudo systemctl start atd

And the top line of a sample job file was:

   #!/bin/bash

To put back the original versions:

   sudo mv /usr/bin/at.org /usr/bin/at
   sudo mv /usr/sbin/atd.org
/usr/sbin/atd
   sudo systemctl stop atd
   sudo systemctl start atd

Writing this email took substantially longer than getting the modified version of at/atd done, installed and working.

Regards, K.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer at biplane.com.au)
http://www.biplane.com.au/kauer
http://twitter.com/kauer389

GPG fingerprint: E00D 64ED 9C6A 8605 21E0 0ED0 EE64 2BEE CBCB C38B
Old fingerprint: 3C41 82BE A9E7 99A1 B931 5AE7 7638 0147 2C3C 2AC4







More information about the ubuntu-users mailing list