Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Cron confusion - scheduling a script Post 302773253 by landog on Wednesday 27th of February 2013 02:48:47 PM
Old 02-27-2013
Cron confusion - scheduling a script

I have a script that backs up a directory, creates a log file and mails the log file to us.
Code:
find . -print | backup -ivqf/dev/rmt0 | tee backup.log
cat backup.log|mail -v -s "Tape backup log" maillist

This script works fine from the console.

When I schedule it in cron, I never get the email notice. I look at processes and I see different pieces of the script running.
Code:
    root 11468818 14745632   0 13:53:00      -  0:00 tee backup.log
    root 12910658 14745632   0 13:53:00      -  0:00 find . -print
    root 13959374 14745632 120 13:53:00      -  0:50 backbyname -i -v -q -f /dev/rmt0
    root 14745632  6357192   0 13:53:00      -  0:00 /bin/ksh /testhost/testfiles/bckup.sh

Any tape drive commands will show that the tape drive is in use.
Code:
# tctl -f /dev/rmt0 rewind
/dev/rmt0: Resource temporarily unavailable

Any ideas on why my script will run from the console, yet has these problems when scheduled with cron?

Thanks...
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

cron job scheduling

Hi, How can I configure cron file , to execute a script on evey alternate saturdays ? I am using AIX 5.0 machine Thanks in advance Shihab (1 Reply)
Discussion started by: shihabvk
1 Replies

2. UNIX for Dummies Questions & Answers

scheduling tasks with cron

hello there, i'm learning about task scheduling with cron and all seems hyper exciting, yeppie. But there is a prob: assume i have a script that needed to be executed at 7am everyday. I could do: vi mycron 00 7 * * * echo hi mother, i wanna be a script daddy. :wq crontab mycron how... (4 Replies)
Discussion started by: alikun
4 Replies

3. UNIX for Dummies Questions & Answers

Problem with scheduling a shell script on cygwin using cron

Hi, Before I start, I would like to inform that, I went through all FAQs and other threads before posting here. I 'm trying to schedule a shell script on cygwin using cron. No matter what I do I don't seem to get the cron job executing my bash script. My script is temp.sh echo `date` >... (4 Replies)
Discussion started by: shash
4 Replies

4. Solaris

Passing arguments to a shell script from file while scheduling in cron

Hi, I have a shell script Scp_1.sh for which I have to pass 2 arguments to run. I have another script Scp_2.sh which in turns calls script Scp_1.sh inside. How do I make Scp_1.sh script to read arguments automatically from a file, while running Scp_2.sh? -- Weblogic Support (4 Replies)
Discussion started by: weblogicsupport
4 Replies

5. HP-UX

cron scheduling?

Hi all, i want a job to run first monday of every of month. (1 Reply)
Discussion started by: megh
1 Replies

6. UNIX for Dummies Questions & Answers

Understanding cron scheduling command

Below are two cron entries. what is the difference beteeen writing 20 and */20? how is "20 * * * *" different from "*/20 * * * *"? 1) 20 * * * * find /tmp/ -name "*.log.*" ! -name "*.gz" -mmin +1440 -exec gzip '{}' \; 2) */20 * * * * find /tmp/ -name "*.tmp.*" ! -name "*.gz" -mmin +1440... (6 Replies)
Discussion started by: niks
6 Replies

7. UNIX for Advanced & Expert Users

Scheduling bi-weekly through cron

Is there a way in AIX to schedule a script to run bi-weekly through cron? I have a script that needs to run every other Wednesday, and this is what I thought I had to enter in the crontab file: 00 08 * * 3/2 /home/user/user.script It didn't like that. It reports a syntax error. I'm almost... (5 Replies)
Discussion started by: LPT
5 Replies

8. UNIX for Dummies Questions & Answers

Scheduling tasks with cron in Slackware 12

How do I start, restart and stop the cron service under Slackware 12? (1 Reply)
Discussion started by: proactiveaditya
1 Replies

9. Shell Programming and Scripting

Cron Job Scheduling

Hi All, I have a script which is scheduled in the Cron. It runs every 10th and 40th min of an hour.The job has to run every 30min. But, I do not want to have the 00:10 MST run every day.Is it possible to exclude that run from the schedule?Or any other way through which i can run my job every... (4 Replies)
Discussion started by: sparks
4 Replies

10. Red Hat

Scheduling cron job

Hi Everybody, I want to run a script at every 5 seconds. I know how to run it every 5 minutes, is there any possibility to run a script at 5 seconds interval. Regards, Mastan (3 Replies)
Discussion started by: mastansaheb
3 Replies
SCSI_TEMPERATURE(8)						     SG3_UTILS						       SCSI_TEMPERATURE(8)

NAME
scsi_temperature - fetch the temperature of a SCSI device SYNOPSIS
scsi_temperature [--help] [--verbose] DEVICE [DEVICE]* DESCRIPTION
This Bourne shell script calls the sg_logs utility on each given DEVICE in order to find the device's temperature. The Temperature log page is checked first and if it is not available then the Informational Exceptions log page is checked. OPTIONS
Arguments to long options are mandatory for short options as well. -h, --help print out the usage message then exit. -v, --verbose increase level or verbosity. EXIT STATUS
The exit status of this script is 0 when it is successful. Otherwise the exit status is that of the last sg_logs utility called. See the sg3_utils(8) man page. AUTHORS
Written by D. Gilbert COPYRIGHT
Copyright (C) 2011 Douglas Gilbert This software is distributed under a FreeBSD license. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR- POSE. SEE ALSO
sg_logs (sg3_utils) sg3_utils-1.33 December 2011 SCSI_TEMPERATURE(8)
All times are GMT -4. The time now is 04:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy