kifarunix.com
Open in
urlscan Pro
2606:4700:20::ac43:4a37
Public Scan
URL:
https://kifarunix.com/scheduling-tasks-using-at-command-in-linux/
Submission: On February 02 via api from IN — Scanned from DE
Submission: On February 02 via api from IN — Scanned from DE
Form analysis
6 forms found in the DOMhttps://kifarunix.com/
<form class="td-search-form" action="https://kifarunix.com/">
<div class="td-search-close"><span><i class="td-icon-close-mobile"></i></span></div>
<div role="search" class="td-search-input"><span>Search</span>
<input id="td-header-search-mob" name="s" autocomplete="off">
</div>
</form>
POST #
<form id="loginForm" action="#" method="post">
<div class="td-login-inputs"><input class="td-login-input" autocomplete="username" name="login_email" id="login_email" required=""><label for="login_email">your username</label></div>
<div class="td-login-inputs"><input class="td-login-input" autocomplete="current-password" type="password" name="login_pass" id="login_pass" required=""><label for="login_pass">your password</label></div><input type="button" name="login_button"
id="login_button" class="wpb_button btn td-login-button" value="Login">
</form>
POST #
<form id="forgotpassForm" action="#" method="post">
<div class="td-login-inputs"><input class="td-login-input" name="forgot_email" id="forgot_email" required=""><label for="forgot_email">your email</label></div><input type="button" name="forgot_button" id="forgot_button"
class="wpb_button btn td-login-button" value="Send My Password">
</form>
POST https://kifarunix.com/wp-comments-post.php
<form action="https://kifarunix.com/wp-comments-post.php" method="post" id="commentform" class="comment-form" novalidate="">
<div class="clearfix"></div>
<div class="comment-form-input-wrap td-form-comment"><textarea placeholder="Comment:" id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea>
<div class="td-warning-comment">Please enter your comment!</div>
</div>
<div class="comment-form-input-wrap td-form-author"><input id="author" name="author" placeholder="Name:*" size="30" aria-required="true">
<div class="td-warning-author">Please enter your name here</div>
</div>
<div class="comment-form-input-wrap td-form-email"><input id="email" name="email" placeholder="Email:*" size="30" aria-required="true">
<div class="td-warning-email-error">You have entered an incorrect email address!</div>
<div class="td-warning-email">Please enter your email address here</div>
</div>
<div class="comment-form-input-wrap td-form-url"><input id="url" name="url" placeholder="Website:" size="30"></div>
<p class="comment-form-cookies-consent"><input id="wp-comment-cookies-consent" name="wp-comment-cookies-consent" type="checkbox" value="yes"><label for="wp-comment-cookies-consent">Save my name, email, and website in this browser for the next time
I comment.</label></p>
<p class="form-submit"><input name="submit" type="submit" id="submit" class="submit" value="Post Comment"> <input type="hidden" name="comment_post_ID" value="4138" id="comment_post_ID">
<input type="hidden" name="comment_parent" id="comment_parent" value="0">
</p>
<p style="display:none"><input type="hidden" id="akismet_comment_nonce" name="akismet_comment_nonce" value="0e5c122cfa"></p>
<p style="display:none!important"><label>Δ<textarea name="ak_hp_textarea" cols="45" rows="8" maxlength="100"></textarea></label><input type="hidden" id="ak_js_1" name="ak_js" value="1675347100862">
<script ez-screx="true">
document.getElementById("ak_js_1").setAttribute("value", (new Date()).getTime());
</script>
</p>
</form>
https://kifarunix.com/
<form class="td-search-form-widget" action="https://kifarunix.com/">
<div role="search"><input class="td-widget-search-input" name="s" id="s"><input class="wpb_button wpb_btn-inverse btn" type="submit" id="searchsubmit" value="Search"></div>
</form>
https://kifarunix.com
<form action="https://kifarunix.com"><label class="screen-reader-text" for="cat">Categories</label><select name="cat" id="cat" class="postform">
<option value="-1">Select Category</option>
<option class="level-0" value="360">Acutenix</option>
<option class="level-0" value="103">AlienVault</option>
<option class="level-0" value="1112">anacron</option>
<option class="level-0" value="1884">Ansible</option>
<option class="level-0" value="168">Antivirus</option>
<option class="level-0" value="976">AnyDesk</option>
<option class="level-0" value="254">Apache</option>
<option class="level-0" value="984">Asset Management</option>
<option class="level-0" value="1113">at/batch</option>
<option class="level-0" value="1110">Automate System Tasks</option>
<option class="level-0" value="1722">Automation</option>
<option class="level-0" value="992">Automation</option>
<option class="level-0" value="907">BackupPC</option>
<option class="level-0" value="979">BIND</option>
<option class="level-0" value="2942">Bug Tracker</option>
<option class="level-0" value="152">Capacity planning</option>
<option class="level-0" value="1338">Ceph</option>
<option class="level-0" value="126">Certifications</option>
<option class="level-0" value="931">chrony</option>
<option class="level-0" value="1410">Cisco CCNA R&S</option>
<option class="level-0" value="1885">Cloud Compute</option>
<option class="level-0" value="1087">CMS</option>
<option class="level-0" value="926">Cockpit</option>
<option class="level-0" value="1076">Containers</option>
<option class="level-0" value="1686">CRM</option>
<option class="level-0" value="1111">cron jobs</option>
<option class="level-0" value="299">Database</option>
<option class="level-0" value="993">Desktop Environment</option>
<option class="level-0" value="258">DHCP Server</option>
<option class="level-0" value="285">Directory Server</option>
<option class="level-0" value="971">DNS</option>
<option class="level-0" value="1077">Docker</option>
<option class="level-0" value="910">Elastic Stack</option>
<option class="level-0" value="272">Email</option>
<option class="level-0" value="159">Encryption</option>
<option class="level-0" value="380">Enigmail</option>
<option class="level-0" value="948">File Recovery</option>
<option class="level-0" value="310">FIM</option>
<option class="level-0" value="1119">find</option>
<option class="level-0" value="44">Firewall</option>
<option class="level-0" value="949">Foremost</option>
<option class="level-0" value="314">Forensics</option>
<option class="level-0" value="280">FreeBSD</option>
<option class="level-0" value="1152">FreeIPA</option>
<option class="level-0" value="345">GlusterFS</option>
<option class="level-0" value="1083">GoAccess</option>
<option class="level-0" value="301">Grafana</option>
<option class="level-0" value="962">Graylog</option>
<option class="level-0" value="474">grep</option>
<option class="level-0" value="917">Guacamole</option>
<option class="level-0" value="1032">HAProxy</option>
<option class="level-0" value="121">HowTos</option>
<option class="level-0" value="179">Icinga</option>
<option class="level-0" value="246">Identity Management</option>
<option class="level-0" value="936">InfluxDB</option>
<option class="level-0" value="79">iSCSI</option>
<option class="level-0" value="795">Java</option>
<option class="level-0" value="994">KDE</option>
<option class="level-0" value="1070">Kolide</option>
<option class="level-0" value="1668">Kubernetes</option>
<option class="level-0" value="112">KVM</option>
<option class="level-0" value="201">LAMP Stack</option>
<option class="level-0" value="906">Landscape</option>
<option class="level-0" value="235">LEMP Stack</option>
<option class="level-0" value="49">Linux Commands</option>
<option class="level-0" value="92">Load Balancers</option>
<option class="level-0" value="127">LPIC-1</option>
<option class="level-0" value="128">LPIC-2</option>
<option class="level-0" value="172">LPIC-2 Exam 201-405 Topics and Objectives</option>
<option class="level-0" value="173">LPIC-2 Exam 202-405 Topics and Objectives</option>
<option class="level-0" value="43">LVM</option>
<option class="level-0" value="985">ManageEngine AssetExplorer</option>
<option class="level-0" value="928">MariaDB</option>
<option class="level-0" value="312">Metasploit</option>
<option class="level-0" value="1207">modsecurity</option>
<option class="level-0" value="959">MongoDB</option>
<option class="level-0" value="72">Monitoring</option>
<option class="level-0" value="1192">Monitorix</option>
<option class="level-0" value="372">MSSQL</option>
<option class="level-0" value="929">MySQL</option>
<option class="level-0" value="73">Nagios</option>
<option class="level-0" value="151">Nessus</option>
<option class="level-0" value="68">Netplan</option>
<option class="level-0" value="63">Networking</option>
<option class="level-0" value="1250">Nextcloud</option>
<option class="level-0" value="48">NFS</option>
<option class="level-0" value="304">Nginx</option>
<option class="level-0" value="671">nmcli</option>
<option class="level-0" value="672">nmcli</option>
<option class="level-0" value="969">Node Exporter</option>
<option class="level-0" value="236">NTP</option>
<option class="level-0" value="930">ntpd</option>
<option class="level-0" value="1094">OCS Inventory</option>
<option class="level-0" value="1099">OpenLDAP</option>
<option class="level-0" value="1886">OpenStack</option>
<option class="level-0" value="370">OpenVAS</option>
<option class="level-0" value="282">OpenVPN</option>
<option class="level-0" value="45">OPNsense</option>
<option class="level-0" value="2959">OS</option>
<option class="level-0" value="1065">osquery</option>
<option class="level-0" value="273">OSSEC</option>
<option class="level-0" value="249">ownCloud</option>
<option class="level-0" value="1005">Package Installation</option>
<option class="level-0" value="339">Password Managers</option>
<option class="level-0" value="352">Password Policies</option>
<option class="level-0" value="1358">Perf</option>
<option class="level-0" value="1454">pfSense</option>
<option class="level-0" value="889">Phishing</option>
<option class="level-0" value="342">PHP</option>
<option class="level-0" value="938">phpMyAdmin</option>
<option class="level-0" value="1631">Postfix</option>
<option class="level-0" value="93">Pound</option>
<option class="level-0" value="972">PowerDNS</option>
<option class="level-0" value="1170">Project Management</option>
<option class="level-0" value="294">Prometheus</option>
<option class="level-0" value="250">Proxy</option>
<option class="level-0" value="47">QRadar</option>
<option class="level-0" value="298">RADIUS</option>
<option class="level-0" value="3426">RAID</option>
<option class="level-0" value="1171">Redmine</option>
<option class="level-0" value="214">Remote Desktop</option>
<option class="level-0" value="3121">Repository Managers</option>
<option class="level-0" value="1323">Request Tracker (RT)</option>
<option class="level-0" value="237">RHEL</option>
<option class="level-0" value="191">Rsyslog</option>
<option class="level-0" value="1073">Sampler</option>
<option class="level-0" value="34">Security</option>
<option class="level-0" value="383">SED</option>
<option class="level-0" value="1006">Sendmail</option>
<option class="level-0" value="42">SIEM</option>
<option class="level-0" value="1089">Snipe-IT</option>
<option class="level-0" value="347">SNMP</option>
<option class="level-0" value="362">SSH</option>
<option class="level-0" value="1187">SSL/TLS</option>
<option class="level-0" value="39">Storage</option>
<option class="level-0" value="1123">sudo</option>
<option class="level-0" value="317">Suricata</option>
<option class="level-0" value="331">Syslog</option>
<option class="level-0" value="595">syspass</option>
<option class="level-0" value="218">System Auditing</option>
<option class="level-0" value="376">System Manager</option>
<option class="level-0" value="933">Telegraf</option>
<option class="level-0" value="358">Threat Detection</option>
<option class="level-0" value="932">TICK Stack</option>
<option class="level-0" value="1322">Ticketing Systems</option>
<option class="level-0" value="939">TIG stack</option>
<option class="level-0" value="334">tomcat</option>
<option class="level-0" value="64">Ubuntu 18.04</option>
<option class="level-0" value="2960">Ubuntu 20.04</option>
<option class="level-0" value="1">Uncategorized</option>
<option class="level-0" value="374">vim</option>
<option class="level-0" value="46">VirtualBox</option>
<option class="level-0" value="36">Virtualization</option>
<option class="level-0" value="208">VMware</option>
<option class="level-0" value="1147">VNC</option>
<option class="level-0" value="321">VPN</option>
<option class="level-0" value="150">Vulnerability Scanners</option>
<option class="level-0" value="305">WAF</option>
<option class="level-0" value="1823">Wazuh</option>
<option class="level-0" value="253">Web Servers</option>
<option class="level-0" value="941">Webmin</option>
<option class="level-0" value="1275">wiki</option>
<option class="level-0" value="753">wireless</option>
<option class="level-0" value="1015">Wireshark</option>
<option class="level-0" value="292">WordPress</option>
<option class="level-0" value="263">WPScan</option>
<option class="level-0" value="261">Zabbix</option>
<option class="level-0" value="944">zimbra</option>
</select></form>
Text Content
🌎 DE EN FR ES IT HR SV SR SL NL ✕ 🍪 DATENSCHUTZ & TRANSPARENZ Wir und unsere Partner verwenden Cookies, um Informationen auf einem Gerät speichern und/oder abrufen zu können. Wir und unsere Partner verwenden Daten für Personalisierte Anzeigen und Inhalte, Anzeigen- und Inhaltsmessungen, Erkenntnisse über Zielgruppen und Produktentwicklungen. Ein Beispiel für Daten, welche verarbeitet werden, kann eine in einem Cookie gespeicherte eindeutige Kennung sein. Einige unserer Partner können Ihre Daten im Rahmen ihrer legitimen Geschäftsinteressen verarbeiten, ohne Ihre Zustimmung einzuholen. Um die Verwendungszwecke einzusehen, für die diese ihrer Meinung nach ein berechtigtes Interesse haben, oder um dieser Datenverarbeitung zu widersprechen, verwenden Sie den unten stehenden Link zur Anbieterliste. Die übermittelte Einwilligung wird nur für die von dieser Webseite ausgehende Datenverarbeitung verwendet. Wenn Sie Ihre Einstellungen ändern oder Ihre Einwilligung jederzeit widerrufen möchten, finden Sie den Link dazu in unserer Datenschutzerklärung, die von unserer Homepage aus zugänglich ist. Einstellungen verwalten Weiter mit den empfohlenen Cookies Anbieter-Liste | Datenschutzerklärung * HowTos * Security * Virtualization * Storage * Networking * Monitoring * Linux Commands * Advertise with us Search Tuesday, January 17, 2023 * Home * Contact Us * About Us * Privacy Policy * Advertise With Us Sign in Welcome! Log into your account your username your password Forgot your password? Get help Password recovery Recover your password your email A password will be e-mailed to you. kifarunix.com * HowTos * Security * Virtualization * Storage * Networking * Monitoring * Linux Commands * Advertise with us Home Automate System Tasks at/batch Scheduling tasks using at command in Linux * at/batch * Automate System Tasks * HowTos SCHEDULING TASKS USING AT COMMAND IN LINUX By koromicha - September 7, 2019 1 2466 Facebook Twitter Pinterest WhatsApp Our previous two guides, whose links are below, we covered how to schedule system tasks or jobs in Linux using the cron and anacron commands. This guide will focus on scheduling tasks using at command in Linux systems. How to Schedule Cron Jobs/Tasks in Linux/Unix Scheduling tasks using anacron in Linux/Unix SCHEDULING TASKS USING AT COMMAND IN LINUX at utility is used to schedule a one-time task. These are the tasks that are executed only once at a specific time. at reads commands from standard input or from the file that is specified using the -f option. Jobs scheduled using at are executed by the atd service. SCHEDULING TASKS USING AT COMMAND The at command ordinarily expects time as the argument. at TIME Where TIME can be specified using keywords such as; * noon, midnight or teatime (4:00 PM), * next week, tomorrow, teatime tomorrow, next tuesday,next Tue, next Tuesday, next month. When executed with no commands or scripts passed to it, at commands runs interactively and expects you to enter the commands to execute from the prompt. at 11 PM Dec 2 at> At the prompt, enter the command to run. For example; at 11 PM Dec 2 at> echo "This is a test at Job > /tmp/test-at-job" at 11 PM Dec 2 at> df -hT When done typing commands, press Ctrl+D to terminate input. When you press Ctrl+D, you will see <EOT> at the command line. at 11 PM Dec 2 at> df -hT You can as well pass the commands to execute to at command from command line by specifying the file with commands using the -f option. For example, consider a file called mycommands.sh with two shell scripts cat mycommands.sh /home/me/myscripts/clean-tmp.sh /home/me/myscripts/backup.sh To have at execute these commands next week the same day at midnight; at -f mycommands.sh midnight next week You can as well use the standard input redirection symbol; at teatime next month < mycommands.sh You can also pipe tasks/commands to at command. For example to create a notification using the notify-send command, echo 'notify-send "You need to refill the gas"' -t 1000 | at 17:00 This will send you a notification at 5 PM to refill the gas. NOTE: * For all the at examples that follows below, you can either pass the the commands or scripts or tasks/jobs to be executed to at command or you can interactively enter them. To run the job one week from today, same time as when the at job was scheduled; at next week To run the job at 4 PM tomorrow at teatime tomorrow Run a job on next Tuesday, same time as when the job was scheduled. at next tue Run the job next month, same date at midnight. at midnight next month * using the keyword now plus a time period. For example, if to schedule a task to run 4 hours from now, use the time period now + 4 hours. * For example; To run the job today at 4PM plus 2 hours, that is at 6PM at 4PM + 2 hours To run the job one and half hour from now; at now + 90 minutes To run the job two minutes from now; at now + 2 minutes To run a job next on monday 2 hours after the same time when the job was scheduled; at monday + 2 hours * using a time of the day either in 24-hour or 12-hour clock system. For example; 16:00 or 4:00 PM. * For example; To run the job at 5PM today; at 5:00 PM or at 5 PM or at 17:00 * using time of the day and date. * The date can be specified in the format DD.MM.YY, MMDDYY or MM/DD/YY. * MONTH Date, Year or MONTH Date Year or MONTH Date. You can write the first three letters of the month e.g Jan or jan. * For example, To run the job on first october, year 2019 same time as when the job was scheduled at 12:30 PM 10/01/19 or at 12:30 PM 01.10.19 or at 12:30 PM 100119 To run the job on 2nd Jan, 2020 same time as when the job was scheduled at Jan 1, 2020 ot at Jan 1 2020 To run the job at 11 PM on 2nd Dec, this year; at 11 PM Dec 2 LIST SCHEDULED AT JOBS At command has a utility called atq that can be used to list at jobs that are pending execution. To simply list the at jobs, run; atq If there are any jobs pending execution, you will see them on the output; atq 31 Mon Dec 2 23:00:00 2019 a root 33 Sun Oct 6 16:00:00 2019 a root 32 Fri Sep 13 00:00:00 2019 a root Similarly, you can use at command with -l option. at -l DELETE SCHEDULED AT JOBS Scheduled at jobs can be removed using the atrm utility or by passing option -r to at command. atr -r <JOB ID> or atrm <JOB ID> For example, based on the output of the atq command above, you can remove at job with job number 31 using the command; at -r 31 or atrm 31 To remove all the jobs in the queue, simply obtain the job numbers and remove them as follows; atrm $(atq | cut -f1) There are other options that are aliased to atrm command. at -d <JOB ID> PRINT LISTED AT JOBS TO STDOUT To print listed at jobs to standard output, simply use the command; at -c <JOB ID> For example, to cat the at job number 23 to standard output. at -c 23 CONTROLLING ACCESS TO AT It is also possible to control who can run at jobs using the /etc/at.allow and /etc/at.deny files. * only users listed in the at.allow file are allowed to use at * users listed in at.deny file are not allowed to use at. USING BATCH COMMAND Another command almost similar to at command is batch command. This command is used to schedule tasks that can only be executed when system load drops below 1.5 or any value specified in Batch command does not accepts any parameters and runs interactively. batch at> For example to execute the script, /home/me/myscripts/clean-tmp.sh, simply run batch command and enter the script at the at prompt. Press Ctrl+d once you are done typing commands; batch at> /home/me/myscripts/clean-tmp.sh at> batch command is no longer maintained on most Linux/Unix distributions. Read more about at command on man at. Well, that is all on our guide on scheduling tasks using at command in Linux systems. * TAGS * at * at jobs * batch Share Facebook Twitter Pinterest WhatsApp Previous articleScheduling tasks using anacron in Linux/Unix Next articleUsing Find Command to Search for Files and Directories in Linux koromicha I am the Co-founder of Kifarunix.com, Linux and the whole FOSS enthusiast, Linux System Admin and a Blue Teamer who loves to share technological tips and hacks with others as a way of sharing knowledge as: "In vain have you acquired knowledge if you have not imparted it to others". RELATED ARTICLESMORE FROM AUTHOR 6 WAYS TO BOOST EMAIL SECURITY HOW TO CHECK DOCKER CONTAINER RAM AND CPU USAGE PERFORM UNATTENDED VM INSTALLATION ON VIRTUALBOX 7 DEPLOY NRPE AGENT AS A DOCKER CONTAINER 6 ESSENTIAL FACTORS TO CONSIDER WHEN ENTERING THE WORLD OF FRANCHISING WANT TO RUN ANDROID APPS ON PC? HERE’S HOW 1 COMMENT 1. Jalal March 8, 2020 At 07:54 Hi, Very useful article Thanks a lot Reply Sponsored Content * Der Preis für Luxus-Whirlpools könnte Sie überraschen Whirlpools | Gesponserte Links * Ohne Botox & ohne OP! Beauty Trend aus "Die Höhle der Löwen" www.glow-beauty.club * 1 einfacher Weg, Ihre Leber zu entgiften und Gewicht zu verlieren (versuchen Sie es zuhause) Gesundheitswissen Aktuell * Senioren empört: Anspruch auf Sterbegeld ist vielen unbekannt Pro Verbraucher LEAVE A REPLY CANCEL REPLY Please enter your comment! Please enter your name here You have entered an incorrect email address! Please enter your email address here Save my name, email, and website in this browser for the next time I comment. Δ RECENT POSTS * 6 Ways To Boost Email Security January 17, 2023 * How to Check Docker Container RAM and CPU Usage January 16, 2023 * Perform Unattended VM Installation on VirtualBox 7 January 14, 2023 * Deploy NRPE Agent as a Docker Container January 13, 2023 * 6 Essential Factors to Consider When Entering the World of Franchising January 12, 2023 CATEGORIES CategoriesSelect CategoryAcutenixAlienVaultanacronAnsibleAntivirusAnyDeskApacheAsset Managementat/batchAutomate System TasksAutomationAutomationBackupPCBINDBug TrackerCapacity planningCephCertificationschronyCisco CCNA R&SCloud ComputeCMSCockpitContainersCRMcron jobsDatabaseDesktop EnvironmentDHCP ServerDirectory ServerDNSDockerElastic StackEmailEncryptionEnigmailFile RecoveryFIMfindFirewallForemostForensicsFreeBSDFreeIPAGlusterFSGoAccessGrafanaGrayloggrepGuacamoleHAProxyHowTosIcingaIdentity ManagementInfluxDBiSCSIJavaKDEKolideKubernetesKVMLAMP StackLandscapeLEMP StackLinux CommandsLoad BalancersLPIC-1LPIC-2LPIC-2 Exam 201-405 Topics and ObjectivesLPIC-2 Exam 202-405 Topics and ObjectivesLVMManageEngine AssetExplorerMariaDBMetasploitmodsecurityMongoDBMonitoringMonitorixMSSQLMySQLNagiosNessusNetplanNetworkingNextcloudNFSNginxnmclinmcliNode ExporterNTPntpdOCS InventoryOpenLDAPOpenStackOpenVASOpenVPNOPNsenseOSosqueryOSSECownCloudPackage InstallationPassword ManagersPassword PoliciesPerfpfSensePhishingPHPphpMyAdminPostfixPoundPowerDNSProject ManagementPrometheusProxyQRadarRADIUSRAIDRedmineRemote DesktopRepository ManagersRequest Tracker (RT)RHELRsyslogSamplerSecuritySEDSendmailSIEMSnipe-ITSNMPSSHSSL/TLSStoragesudoSuricataSyslogsyspassSystem AuditingSystem ManagerTelegrafThreat DetectionTICK StackTicketing SystemsTIG stacktomcatUbuntu 18.04Ubuntu 20.04UncategorizedvimVirtualBoxVirtualizationVMwareVNCVPNVulnerability ScannersWAFWazuhWeb ServersWebminwikiwirelessWiresharkWordPressWPScanZabbixzimbra Kifarunix is a blog dedicated to providing tips, tricks and HowTos for *Nix enthusiasts; Command cheat sheets, monitoring, server configurations, virtualization, systems security, networking…the whole FOSS technologies. The major aim of all this is to share our *Nix skills and knowledge with anyone who is interested especially the upcoming system admins. Stay connected and let us grow together. * Home * Contact Us * About Us * Privacy Policy * Advertise With Us © Copyright 2023 Kifarunix. All rights reserved x ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_~ x