Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

27.2.3. Configuring an At Job


To schedule a one-time job for a specific time with the At utility, do the following:
  1. On the command line, type the command at TIME, where TIME is the time when the command is to be executed.
    The TIME argument can be defined in any of the following formats:
    • HH:MM specifies the exact hour and minute; For example, 04:00 specifies 4:00 a.m.
    • midnight specifies 12:00 a.m.
    • noon specifies 12:00 p.m.
    • teatime specifies 4:00 p.m.
    • MONTHDAYYEAR format; For example, January 15 2012 specifies the 15th day of January in the year 2012. The year value is optional.
    • MMDDYY, MM/DD/YY, or MM.DD.YY formats; For example, 011512 for the 15th day of January in the year 2012.
    • now + TIME where TIME is defined as an integer and the value type: minutes, hours, days, or weeks. For example, now + 5 days specifies that the command will be executed at the same time five days from now.
      The time must be specified first, followed by the optional date. For more information about the time format, see the /usr/share/doc/at-<version>/timespec text file.
    If the specified time has past, the job is executed at the time the next day.
  2. In the displayed at> prompt, define the job commands:
    • Type the command the job should execute and press Enter. Optionally, repeat the step to provide multiple commands.
    • Enter a shell script at the prompt and press Enter after each line in the script.
      The job will use the shell set in the user's SHELL environment, the user's login shell, or /bin/sh (whichever is found first).
  3. Once finished, press Ctrl+D on an empty line to exit the prompt.
If the set of commands or the script tries to display information to standard output, the output is emailed to the user.
To view the list of pending jobs, use the atq command. See Section 27.2.5, “Viewing Pending Jobs” for more information.
You can also restrict the usage of the at command. For more information, see Section 27.2.7, “Controlling Access to At and Batch” for details.
Red Hat logoGithubRedditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

© 2024 Red Hat, Inc.