Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Schedule backup with crontab/tar Post 302851173 by Float on Saturday 7th of September 2013 09:58:12 AM
Old 09-07-2013
Schedule backup with crontab/tar

Hello all, I am a complete newbie to Unix and therefor also to this forum. I have an assignment for Uni, and need your help to understand something.

I need to use crontab and tar to schedule a weekly backup of a folder and its contents. I want the tarball to be stored in the users/float directory. The folder name is Important, and is found in /users/float.

Code:
Float@Float-Laptop /cygdrive/c/users/float
$ crontab -e
no crontab for Float - using an empty one
crontab: installing new crontab

Float@Float-Laptop /cygdrive/c/users/float
$ crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.q7dIlq7ckg installed on Sat Sep  7 15:42:49 2013)
# (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $)
45 15 * * 6 tar cvf Important.tar Important

I expected "Important.tar" to show up in users/float at 15.45 Today, but it didn't. Why? I am using Cygwin on my laptop which runs Windows 7.

Last edited by Scott; 09-08-2013 at 08:26 AM.. Reason: Code tags for quote tags
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

crontab schedule - first thursday of every month

Instead of the first five fields, one of eight special strings may appear: string meaning ------ ------- @reboot Run once, at startup. @yearly Run once a year, "0 0 1 1 *". @annually (same as @yearly) @monthly Run once a month, "0 0 1 * *". @weekly Run once... (2 Replies)
Discussion started by: paulds
2 Replies

2. UNIX for Dummies Questions & Answers

Crontab schedule

I have the following crontab entry. 0,30 00-16 * * * This job runs every 30 minutes between the hours of 12:00AM and 4:00PM. How can I have it stop at 4:30PM instead? Thank you, David (3 Replies)
Discussion started by: dkranes
3 Replies

3. Shell Programming and Scripting

How to schedule my script without crontab

I have a script which shoud run after every 30 minutes.Though I know abt crontab, unfortunately I dont have access/authorization to use crontab in my terminal. Could any one pls let me know how to schedule the script without crontab ? Regards Prashant:) (3 Replies)
Discussion started by: prashant43
3 Replies

4. Shell Programming and Scripting

Schedule a job using Crontab

I would like to execute my script at 17.30 and 23.00 using crontab, could anybody help me out!! Thanks in Advance!! (1 Reply)
Discussion started by: jatanig
1 Replies

5. Shell Programming and Scripting

Unix Crontab schedule

Hi, I want schedule a script with fowllowing days. The crontab and schedule to run every 2 hours from Monday to Saturday at noon. (1 Reply)
Discussion started by: koti_rama
1 Replies

6. Shell Programming and Scripting

Crontab schedule

Hi, I have a script which will query the DB and added to crontab at 1,2,6,7 AM everyday and sends a email if count is 0. Now the problem is, if crontab is disabled it doesn't sends a mail. Please tell me how can I handle this situation in the script. (2 Replies)
Discussion started by: sandy1028
2 Replies

7. UNIX for Advanced & Expert Users

Schedule a Crontab

All, I'm a newbie with crontab and I need your help with schedule a cold-backup running every Sunday at 7am except 1st of the month. Thank you so much. (2 Replies)
Discussion started by: hanie123
2 Replies

8. Shell Programming and Scripting

How to schedule a script in crontab.

Hi, My script is in $home/bin/sample.sh. I want to run the script for 3times a day, first execution will be at 08:00 am. second execution will be at 16:00 pm third will be at 23:59 pm. what will be the entry with this requirement?? (1 Reply)
Discussion started by: shrima.pratima
1 Replies

9. Shell Programming and Scripting

Crontab schedule

Hi all, I would like to schedule a crontab script, which should run From 8pm Thursday to 2am Friday and it should run every 10 minutes. I have put a script like below, is it the correct one. 10 01,02,20,21,22,23,00 * * 4-5 /u01/app/test.ksh Any other options available to schedule the same... (6 Replies)
Discussion started by: sid2013
6 Replies

10. Shell Programming and Scripting

How to schedule crontab?

Hi All, How to schedule crontab on all day except sunday and monday means from tuesday to saturday at 06:00AM. (3 Replies)
Discussion started by: Riverstone
3 Replies
CRONTAB(1)						    BSD General Commands Manual 						CRONTAB(1)

NAME
crontab -- maintain crontab files for individual users (V3) SYNOPSIS
crontab [-u user] file crontab [-u user] { -l | -r | -e } DESCRIPTION
The crontab utility is the program used to install, deinstall or list the tables used to drive the cron(8) daemon in Vixie Cron. Each user can have their own crontab, and they are not intended to be edited directly. (Darwin note: Although cron(8) and crontab(5) are officially supported under Darwin, their functionality has been absorbed into launchd(8), which provides a more flexible way of automatically executing commands. See launchctl(1) for more information.) If the /usr/lib/cron/cron.allow file exists, then you must be listed therein in order to be allowed to use this command. If the /usr/lib/cron/cron.allow file does not exist but the /usr/lib/cron/cron.deny file does exist, then you must not be listed in the /usr/lib/cron/cron.deny file in order to use this command. If neither of these files exists, then depending on site-dependent configuration parameters, only the super user will be allowed to use this command, or all users will be able to use this command. The format of these files is one username per line, with no leading or trailing whitespace. Lines of other formats will be ignored, and so can be used for com- ments. The first form of this command is used to install a new crontab from some named file or standard input if the pseudo-filename '-' is given. The following options are available: -u Specify the name of the user whose crontab is to be tweaked. If this option is not given, crontab examines ``your'' crontab, i.e., the crontab of the person executing the command. Note that su(1) can confuse crontab and that if you are running inside of su(1) you should always use the -u option for safety's sake. -l Display the current crontab on standard output. -r Remove the current crontab. -e Edit the current crontab using the editor specified by the VISUAL or EDITOR environment variables. The specified editor must edit the file in place; any editor that unlinks the file and recreates it cannot be used. After you exit from the editor, the modified crontab will be installed automatically. FILES
/usr/lib/cron/cron.allow /usr/lib/cron/cron.deny DIAGNOSTICS
A fairly informative usage message appears if you run it with a bad command line. SEE ALSO
crontab(5), compat(5), cron(8), launchctl(1) STANDARDS
The crontab command conforms to IEEE Std 1003.2 (``POSIX.2''). The new command syntax differs from previous versions of Vixie Cron, as well as from the classic SVR3 syntax. AUTHORS
Paul Vixie <paul@vix.com> BSD
December 29, 1993 BSD
All times are GMT -4. The time now is 03:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy