Using at command for scheduling one time jobs on a Mac

0

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.atrun.plist

$ at now + 1 minute
ruby '/Users/<username>/code/ruby/email.rb'

use Ctrl-D to save and exit

  • To see what's on the queue type atq
  • To see what the job does type at -c <job number>
  • To remove jobs from the queue type atrm <job number>

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.atrun.plist

References
1. https://developercoach.com/using-at-for-command-scheduling-under-mac-os-x/

  • 0 posts
  • 0 subtopics
  • 3 months ago by vince