Sponsored Content
Full Discussion: EOF problem with Cron Job?
Top Forums UNIX for Dummies Questions & Answers EOF problem with Cron Job? Post 302473827 by vbe on Monday 22nd of November 2010 01:30:21 PM
Old 11-22-2010
write a script:
Code:
vi mybackup

content:
Code:
#@(#)mybackup v1.0 : Backup using tar...   Author:...
#---------------  Set env first -----------------#
date=`date +%d` 
PATH=...
#----------------- Processing -------------------#

tar -zcvf /home/mysite/backups/backup_dev_$date.tgz \
/home/mysite/public_html/dev/app \
--exclude=/home/mysite/public_html/dev/app/tmp

#----------------- End - exit -------------------#

Then make it executable
Code:
chmod 755 mybackup
what mybackup

insert a line in your crontab file :
Code:
00 10 * * 0 <path_to>/mybackup >> <yourlog_directory>/mybackup.log  2>&1

 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Run cron job problem

I have the below crontab job that it will run at every 7:00am - 10:00am , it work fine , now if I want to skip to run the crontab job at a specific time , eg. I want the script not to run at next Monday 8:00am ( only skip this time , other time is normal ) , how can I make it ? is it possible ?... (3 Replies)
Discussion started by: ust
3 Replies

2. UNIX for Advanced & Expert Users

Cron job skipping problem

Hi, I have a crontab that runs some shell scripts at fixed intervals. Although, one condition for a script to continue is that a previous instance of the same script should have terminated. But, inspite of the fact that the old instance has finished execution, the new instance still terminates. ... (3 Replies)
Discussion started by: puneetarora_12
3 Replies

3. Solaris

cron job problem

I am trying to setup cronjob and once I start to save it is not working. This is what I am getting after I executed crontab -e, I am not even getting the privious entry and I am running from root. crontab -e 421 10 3 * * * /usr/sbin/logadm ? :wq ? Why is it not saving? Any input is... (4 Replies)
Discussion started by: mokkan
4 Replies

4. Solaris

problem with cron job

new to unix here, im learning how to schedule jobs with crontab. The following cron job runs under root but not under a test account i created. 50 11 * * 0 /usr/bin/banner "HELLO" > /dev/console i have no idea with it isn't running under the test account but runs right on time when i create... (7 Replies)
Discussion started by: solne
7 Replies

5. Shell Programming and Scripting

Scheduling Cron job-Problem

Hello All, I want to run a script for every 5 minutes interval.So i developed a script which has to be scheduled to run for every 5 minutes. That script internally runs another script. But the problem is it is not executing properly. Can anybody throw some light on this. Below are the code... (4 Replies)
Discussion started by: RSC1985
4 Replies

6. Shell Programming and Scripting

Problem with Cron job

Hi , I have a TCL script which i am supposed to run as a cron job.. The script works fine from command line , but when run as a cron job , its unable to find a package,, my crontab is as follows. --------------------------- #!/usr/bin/ksh * * * * * PATH=/cm8/auto/Automation/Library/TclLib ... (7 Replies)
Discussion started by: Sudharshana
7 Replies

7. UNIX for Dummies Questions & Answers

Cron job problem

I have a perl script which Im planning to run every minute. I have set the cron job as * * * * * PATH= /usr/local/bin:/usr/bin:/usr/sbin:/usr/lib; perl /dm2/www/html/isos/pre5.3/autoDownload.pl I assume the script is executing every minute only because I see a entry like below when I do... (2 Replies)
Discussion started by: srijith
2 Replies

8. Solaris

Problem with a cron job

When i am trying to open crontab throught command crontab -e. It is not opening? OUTPUT: # crontab -e sh: vim: not found The crontab file was not changed. Please let me know how to open and edit it??? (10 Replies)
Discussion started by: kkalyan
10 Replies

9. Shell Programming and Scripting

Unexpected EOF while looking for matching `'' when ran from a cron job

Since cPanel does not support deleting emails older then X amount of days I am using the following on a Cron Job. find -P /home/user/mail/domain/ -mindepth 2 -mtime '+366' -type f -printf '"%p"\n' | grep -v '/Important' | grep -v '/.Important' | xargs -I {} rm -r "{}" Executing it via SSH... (4 Replies)
Discussion started by: tiagom
4 Replies

10. Shell Programming and Scripting

Execution problem with CRON job

HI, I have written an executable file in unix and I was able to execute it successfully but when I called this file with cron job it was giving error like "permission denied" and "No such file or directory". Please help in how cron calls the file and what permission is required on the file... (2 Replies)
Discussion started by: vipin kumar rai
2 Replies
BIO(1)							      General Commands Manual							    BIO(1)

NAME
bio - Barry Input / Output SYNOPSIS
bio -i <input type> [input args] -o <output type> [output args] [-o <output type> ...] DESCRIPTION
bio is a command line tool that treats devices, backups, and data streams as input and output. bio supports the following types of IO (actual type name shown in bold): device tar (backup files) boost (serialization files and streams) mime streams ldif streams human readable and hex text dump sha1 sum output cstore for extracting Content Store records Each command line consists of at least one input and output option, along with their switches. More than one output can be used, as long as they do not conflict with each other. For example, it is not possible to read and write from the same device PIN. This tool combines a lot of the functionality of btool, btardump, brecsum, and bs11nread, but does it more flexibly, and improves function- ality in some cases, such as Boost archives being able to contain more than one database. DEVICE TYPE OPTIONS
The device type is used to read or write from a device connected via USB. Some of the options below are valid only in one input or output mode, some in both. -d db Name of database to load, when using the device type as input. Can be used multiple times. See btool -t for a list of databases on the device. -A Selects all databases found on the device, instead of adding them manually via the -d option. -p pin PIN of device to talk to. Valid for both input and output. Only needed if you have more than one Blackberry connected at once. -P password Simplistic method to specify device password. In a real application, this would be done using a more secure prompt. -w mode Set write mode when using the device type in output mode. This must be specified, or nothing will be written. Can be one of: erase, overwrite, addonly, addnew. erase Erases all records from existing database and adds all new records to the device, using their Unique IDs, if available. This is what you would normally use to restore a backup. overwrite Adds any new records, and for records with Unique IDs that already exist on the device, overwrite them. addonly Adds any new records, but if a record exists in the device with the same Unique ID, skip that record and don't write it to the device. addnew Adds all incoming records as brand new records, generating a new Unique ID for each one, and leaving any existing records intact. This may cause data duplication if you're restoring data that initially came from this same device. Use this for copying data from another device, while keeping your existing records. TAR TYPE OPTIONS
The tar type is used to read or write from a backup file created by btool or the backup GUI. -d db Name of database to load, when using the tar type as input. Can be used multiple times. Note that if no -d options are specified, bio defaults to reading all available databases. -f file The tar backup file to read or write from. Bio uses gzip compressed tar files, so suitable extensions would be .tgz and .tar.gz. Unfortunately, due to internal limitations, an actual file must be specified here, and not - for stdin / stdout. BOOST TYPE OPTIONS
The boost type is used to read and write parsable records in Boost Serialization format. These files were historically written and read by btool and bs11nread. Bio is more flexible, in that it can contain multiple databases in one serialization archive. -f file Filename to read from or write to. Use - to specify stdin or stdout. If not specified for input, defaults to stdin, but since out- put can contain non-ASCII chars, you must use -f - if you want to write to stdout. LDIF TYPE OPTIONS
The ldif type is used to read or write ldif output, like the output of the LDAP command line tool ldapsearch. -c dn When using ldif as output, specify the base DN. -C dnattr Again, for output, specify the attribute name to use when building the FQDN. MIME TYPE OPTIONS
The mime type is used to read or write VCARD, VEVENT, VTODO, or VJOURNAL records based on the Address Book, Calendar, Tasks, or Memos data- bases respectively. -f file Filename to read from or write to. Defaults to - for stdin or stdout. DUMP TYPE OPTIONS
The dump type is used only for output, and sends human readable record data to stdout. Parsable records are parsed; unknown records are dumped in hex format. -n Use hex format for all records. SHA1 TYPE OPTIONS The sha1 type is used to mimic the behaviour of the brecsum command. It calculates a SHA1 sum on the raw record data and sends the sum to stdout. -t Include the DB Name, Type, and Unique record ID in the checksum for each record. CSTORE TYPE OPTIONS
The cstore type is used to parse Content Store records. -l List the filenames and folders found in the Content Store database. -f file Select a filename from the above list to extract and save locally. Specify the entire path as shown in the -l list. If the file is found in the device, it will be written to the current directory, using the base filename as the name. If a file by that name exists already, the filename will be modified to avoid overwriting local files. STANDALONE OPTIONS
-h Displays a detailed summary of command line options. -I cs Set the international charset for string conversions. Valid values here are available with iconv --list -S Show list of supported database parsers and builders. -v Dump verbose low level protocol data during USB operations, to stdout. EXAMPLES
1) Backup a full device to tar backup: bio -i device -A -o tar -f mybackup.tar.gz 2) Read a backup file and convert the Address Book to MIME bio -i tar -f mybackup.tar.gz -d "Address Book" -o mime 3) Restore a single database to a device bio -i tar -f mybackup.tar.gz -d "Address Book" -o device -w erase 4) Copy the Calendar from one device to another, and dump the records to stdout in human readable format at the same time bio -i device -p 3009efe3 -d Calendar -o device -p 204062f3 -w erase -o dump 5) Read LDIF input and convert the contacts to MIME format ldapsearch -x | bio -i ldif -o mime 6) Test the record code by running the Tasks database through the Boost storage and back to human readable bio -i device -d Tasks -o dump vs. bio -i device -d Tasks -o boost -f - | bio -i boost -f - -o dump AUTHOR
bio is part of the Barry project. SEE ALSO
http://www.netdirect.ca/barry May 17, 2011 BIO(1)
All times are GMT -4. The time now is 05:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy