How do I use the at command to run a command at a specified time?



  • Also see:
    Man page for at
    warning: commands will be executed using /bin/sh

    Here are some examples.

    Run immediately. Good for testing.

    $ echo /home/trainer/scripts/hw | at now
    

    Run at a specified time.

    $ echo /home/trainer/scripts/hw | at 12:00
    

    Run after 2 hours.

    $ echo /home/trainer/scripts/hw | at now + 2 hours
    

    Run after 20 minutes

    $ echo /home/trainer/scripts/hw | at 12:00 + 20 minutes
    

    Run at 06:00 next day.

    $ echo /home/trainer/scripts/hw | at 06:00 tomorrow
    

    Run on a certain date.

    $ echo /home/trainer/scripts/hw | at 04 July
    

Log in to reply
 

© Lightnetics 2024