QA
Intermediate LevelLinux Commands & SysAdmin

How does the at command schedule one-off future tasks in Linux?

❓ Interview Prompt: Explain at command daemon (atd), one-time task execution syntax, atq (list queue), atrm (remove job), and time expressions.

While 'cron' manages recurring schedules, the 'at' command schedules a single, non-recurring job for execution at a specified future time:

Usage:

•
Schedule Task: 'echo "/usr/local/bin/patch.sh" | at 02:00 AM tomorrow'
•
List Queued Jobs: 'atq'
•
Remove Queued Job: 'atrm <job_id>'

Code Implementation Example

bash
# Schedule a one-time script execution for 3:30 AM tomorrow
echo "/home/deploy/scripts/cleanup.sh" | at 3:30 AM tomorrow

# List pending scheduled 'at' jobs
atq
💡Scheduling one-off future execution tasks using the at command.
🎯 Interview Key Takeaway

Use the at command for one-time future task execution instead of modifying recurring crontabs.

#at#Scheduling#One-Time Task#Intermediate
Back to all Linux Commands & SysAdmin Questions→

More Linux Commands & SysAdmin Interview Questions

Beginner LevelLinux Commands & SysAdmin

How do Linux File Permissions (chmod, chown, chgrp) work in Octal and Symbolic notation?

Beginner LevelLinux Commands & SysAdmin

What is the Linux Filesystem Hierarchy Standard (/bin, /etc, /var, /usr, /opt, /tmp)?

Beginner LevelLinux Commands & SysAdmin

What are File Descriptors (0=stdin, 1=stdout, 2=stderr) and Redirection (>, >>, 2>&1)?