1 line
1.5 KiB
Plaintext
1 line
1.5 KiB
Plaintext
<!-- SC_OFF --><div class="md"><p>You may know about the <code>at</code> utility, which lets you run commands <em>at</em> some time in the future. For example, <code>at -f ./script.sh now + 1 minute</code> will execute the script in one minute - if the stars align.</p> <p><code>at</code> has two limitations which keep bugging me: - <code>at</code> rounds the time up to the beginning of a minute, i.e. your command or script will always execute at the zero-th second of the minute which follows your intended time of execution. If you need temporal precision you're screwed. - <code>at</code> doesn't preserve the environment of the calling shell. <code>atd</code>, the <code>at</code> daemon will execute the file or the command in its own, minimal environent, which is a nuisance if you're running commands which depend on environment variables. Wanna remind yourself that your tea is ready via a <code>notify-send "Bro, tea is ready"</code>? Forget it, <code>$DISPLAY</code> is undefined.</p> <p>So my question is: Does an alternative to <code>at</code> exist which has second precision and which preserves the environment?</p> <p>Thank you!</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/agentsmurf6"> /u/agentsmurf6 </a> <br/> <span><a href="https://www.reddit.com/r/archlinux/comments/r1b55x/is_there_a_better_replacement_for_the_at_utility/">[link]</a></span>   <span><a href="https://www.reddit.com/r/archlinux/comments/r1b55x/is_there_a_better_replacement_for_the_at_utility/">[comments]</a></span> |