Presented by Dave Mawdsley, DACS Member, Linux SIG February 20, 2013

Slides:



Advertisements
Similar presentations
Never lose your data again!
Advertisements

Backups In Linux. The Linux System Many Linux distros set up seperate "/home" and "/" (root) partitions. User configuration files are hidden with a "."
CSCI 330 T HE UNIX S YSTEM Shell Job Control. T ODAY ’ S CLASS Unix is multi-user, multi-process OS Shell features to control jobs Unix utilities to manage.
Introducing the Command Line CMSC 121 Introduction to UNIX Much of the material in these slides was taken from Dan Hood’s CMSC 121 Lecture Notes.
L INUX C OMMAND L INE I NTERFACE G UNAANBAN.G
One to One instructions Installing and configuring samba on Ubuntu Linux to enable Linux to share files and documents with Windows XP.
Your Interactive Guide to the Digital World Discovering Computers 2012.
Yi Shen Mar 18 th, Backup workshop Stanford Exploration Project.
Chapter 18: Windows Server 2008 R2 and Active Directory Backup and Maintenance BAI617.
Day 8 Exporting Displays Cronjobs Mount. Chapter 5 Chapter 5 talks about X windows. –You should read the chapter. –However, you do not need to pay particular.
Linux+ Guide to Linux Certification, Third Edition
Running the Operational Codes for the Brahmaputra Tom Hopson.
A Practical Guide to Fedora and Red Hat Enterprise Linux Unit 9: Linux Network Services Chapter 16: Administration Tasks By Fred R. McClurg Linux Operating.
1 Periodic Processes and the cron Daemon The cron daemon is where all timed events are initiated. The cron system is serviced by the cron daemon. What.
A Practical Guide to Fedora and Red Hat Enterprise Linux Unit 9: Basic Linux Administration Chapter 11: System Administration: Core Concepts Chapter 16:
1. 2 What to learn and why If you develop and rebuild your Blackboard course shells semester after semester, you may wish you had a more efficient way.
Easy Step – by – step method to create a backup set for your Main drive on a separate backup hard disk. 1.Turn on Retrospect 2.Select – Automate 3.Select.
Review Please hand in any homework and practicals Vim Scripting Inter-device communication.
IT1001 – Personal Computer Hardware & system Operations Week7- Introduction to backup & restore tools Introduction to user account with access rights.
Sys Admin Course Job Scheduling Fourie Joubert. Sys Admin Course Very often, you may want a job to run once at a certain time, or to run regularly at.
Running the Operational Codes for the Brahmaputra Tom Hopson.
Periodic Processes. Computer Center, CS, NCTU 2 Windows 7 工作排程.
1 COP 4343 Unix System Administration Unit 8: – at – cron.
Running the Operational Codes for the Brahmaputra Tom Hopson.
Using Grsync with Ubuntu Presented by Dave Mawdsley, DACS Member, Linux SIG August 20, 2008 (making rsync easy with a memory key or a server)
Pogoplug Pro Presented by Dave Mawdsley, DACS Member, Linux SIG Member (installing and using a Pogoplug Pro)
Presented by Dave Mawdsley, DACS Linux Workshop Leader/Member
Notes on Backups Presented by Dave Mawdsley, DACS Member, Linux SIG Member a look at priorities and simple backup methods.
Using Bash and Perl in Ubuntu to get Stock Quotes Presented by Dave Mawdsley, DACS Member, Linux SIG November 16, 2011 (a quick way to see the latest prices.
Introducing the Arduino Uno Presented by Dave Mawdsley, DACS Member, Linux SIG Member (wiring, programming and running a cute traffic light simulation)
Linux 101: Managing Jobs, Schedules, and Backups Purdue Linux Users Group Speaker: Thor Smith.
Systems Administration (Windows) BIT3111 – Lecture 5 (Introduction to Windows OS)
Presented by Dave Mawdsley, DACS Member, Linux SIG Member
Using Crontab with Ubuntu
GRID COMPUTING.
Presented by Dave Mawdsley, DACS Linux Workshop Leader/Member
SYSTEM ADMINISTRATION PART I by İlker Korkmaz and Kaya Oğuz
Welcome © GTM Software. Welcome © GTM Software.
Presented by Dave Mawdsley, DACS Member, Linux SIG Member
Blocking the Wirenet Trojan
Running the Operational Codes for the Brahmaputra
3.4 User Interfaces This tutorial will give you a first-hand experience of: Navigating the directory structure in a CLI and an unfamiliar GUI Running the.
lctseng / Liang-Chi Tseng Edit: yench
Chapter 9 Periodic Processes
Using pktstat with Bash
Active Directory Administration
Basic Troubleshooting Techniques
The Linux Operating System
System Administration
Discussion about 'Shellshock' fixes--Ubuntu and OS X
Stop Using ./ as in ./scriptname
Getting SSH to Work Between Computers
A First Look at Layers in GIMP
Using Clam Anti-Virus with Ubuntu
Vulnerability Scanning With 'lynis'
How to… Use Crontab for SFX
College of Engineering
(Chapter 2) John Carelli, Instructor Kutztown University
Introducing the Arduino Uno
OPS235: Week 1 Installing Linux ( Lab1: Investigations 1-4)
Periodic Processes.
Chapter 9 Periodic Processes
Version A.01 H3064S Module 14 Slides
Periodic Processes.
Win 10 Training This training is designed to be simple to follow and a hands on experience for the teachers. I would suggest you bring your teachers to.
Command line.
IST346: Operating Systems / Command Line Interfaces
University of Warith AL-Anbiya’a
Periodic Processes.
lctseng / Liang-Chi Tseng
Presentation transcript:

Presented by Dave Mawdsley, DACS Member, Linux SIG February 20, 2013 Beginner's Guide to 'at' (scheduling one-time tasks) Presented by Dave Mawdsley, DACS Member, Linux SIG February 20, 2013

What Does 'at' Do? 1 at is a one-time scheduling utility that activates at a particular time and date. When activated, it can execute a set of commands that can manage backups, shut the computer down, and so forth. The utility can be activated relative to 30 minutes later than the present moment with a command such as: at now + 30 minutes or execute a file my_script in three hours: at -f my_script now + 3 hours One nice advantage of the at command is that if the computer is turned off at the time it should have activated, the at command will pickup and execute when computer is restarted. Unfortunately, this won't happen with specific crontab jobs. For example: 30 8 15 3 * ls -l is a cron job set to execute ls -l on March 3rd at 8:30 AM, but if the computer is off at 8:29 AM that day, it will only work again--next year!

What to Check First 2 Because at tasks execute in the future, it's a good idea to make sure that the environment on your computer is ready for them. Using the command line, issue the following command: cd /etc; ls -l at* to see if at.deny and at.allow exist. (at.allow may not exist.) Next, issue the following command to see the denied users list: sudo cat at.deny at.allow is required for Fedora, but it is not the default in Ubuntu. Next try a simple test to see at in action.

Test to See 'at' in Action 3 Using the command line I typed (blue, responses in black): at 11:49am Jan 18 warning: commands will be executed using /bin/sh at> cd Desktop at> touch Output1; date > Output1 Next I typed CTRL+D to exit the at command listing and automatically save the task. The output next showed: at> <EOT> job 12 at Fri Jan 18 11:49:00 2013 Last, to verify that the task is ready to be performed, I typed: at -l 12 Fri Jan 18 11:49:00 2013 a madmod

4 The Output and a Remark To see the output after the at job occurred, I typed: cat Desktop/Output1 Which yielded the output: Fri Jan 18 11:49:00 EST 2013 Remark: the at command can be set by any allowed user or root. However, Issuing the command using root is probably preferable when the commands in the list require root privileges such as: shutdown -h now

5 A Few Other 'at' Options Look at job number 12 (the c is to cat the job): at -c 12 List all the jobs (the q is to show the queue): atq or at -l (the -l is an alias for atq) Remove job 12 (the rm is to remove): atrm 12

6 Final Thoughts on 'at' My business computer is on early in the day and is turned off at night. So crontab tasks generally work well. I set them to run during the part of the day that the computer is on. For critical one-time tasks that I must not forget—usually in the near future—at tasks are preferred. However, my fileserver is on only when I know that backups will be needed from the computers in the house. This tends to be very late in the day, though it varies somewhat, and some days the fileserver isn't on at all. Tasks that need to be done at the server such as making a server archive or making a clone of the hard disk is better done with at tasks so those reminders to my fileserver's desktop won't be lost.

This OpenOffice.org Presentation 'usingat.odp' can be downloaded from Beginner's Guide to 'at' (scheduling one-time tasks) This OpenOffice.org Presentation 'usingat.odp' can be downloaded from http://madmod.com/freebies.html