09-11-2008
script wont run from cron job
I have written a simple bash script that will run a wget command to recursively ftp an entire directories and it's contents.
#!/bin/bash
wget -r -N
ftp://userass@server//VOL1/dir
If I run from the regular command line it works fine.
root@BUSRV: /media/backup1$ ./gwbu
When I put it in the crontab, it doesn't run.
00 20 * * * /media/backup1/./gwbu
Can anyone take a look at what I have and help me understand why it is not running through crontab? Thanks in advance!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i have this script i wrote, it chokes when running the add install client commandit keeps telling me the add_install_client command is incorrect.
When I put the print statement in front of the command so it will echo it, the command looks right on the screen. Yes im am an ametuer, im trying to... (2 Replies)
Discussion started by: BG_JrAdmin
2 Replies
2. UNIX for Dummies Questions & Answers
Hello,
I have problem in executing a shell script. When the shell script is executed at the shell prompt the script works successfully but when the same script is run as a cron job it fails to execute the files called within the shell script.
I have scheduled the job in my crontab file as
... (6 Replies)
Discussion started by: forumthreads
6 Replies
3. Shell Programming and Scripting
I have a perl script, when I ran manually it works perfect. I check the permissions which are fine.
How can I find out why it is not running? how can I setup a log to check.
I am running it on solaris 9.
It compares multiple files, SCP and then send out an e-mail.
As I said when I ran it... (2 Replies)
Discussion started by: amir07
2 Replies
4. UNIX for Dummies Questions & Answers
My shell script runs fine both as a cron job and when i issue it.
However, I wish to differentiate when it runs as a cron-job so the "echo" statements are not issued (they get mailed to me, which i don't want).
I tried checking $USER but since the cron was created in my user that does not... (5 Replies)
Discussion started by: sentinel
5 Replies
5. UNIX for Advanced & Expert Users
Hi, new to this forum and not sure if this is the right place to post. I'm new to cron jobs and scripts, and I need some help with a script to be used with a cron job. I already have a bot set up at a certain website address and need a script that the cron job will load every day that tells it to... (1 Reply)
Discussion started by: klawless
1 Replies
6. Solaris
Hi,
The following shell script runs without any problem when executed manulally.
USED=$(df -h /arch | tail -1 | awk '{print $5}' | cut -d '%' -f 1)
if
then
find /arch/AUBUAT/ -type f -mtime +0 | xargs rm
find /arch/AUBMIG/ -type f -mtime +0 | xargs rm
fi
But the same gives below... (6 Replies)
Discussion started by: ksadiq79
6 Replies
7. Shell Programming and Scripting
how to run a script using cron job and send the output as attachment via e-mail using unix. please help me.
how my cron job entry should be?
As of now my cron job entry is to run the script at specific time,
15 03 * * * /path/sample.sh | mail -s "Logs" email_id
In the above entry, what... (8 Replies)
Discussion started by: vidhyaS
8 Replies
8. Shell Programming and Scripting
How do I run bash script using a cron job?
I have tried to just write the path of the script, but that didn't work. (1 Reply)
Discussion started by: locoroco
1 Replies
9. Shell Programming and Scripting
Hi,
1)
If some job supposed to run on 1st of every month at 7 AM
In cron job when we have a blackout on the 1st ( i.e when 1st falls on a sunday ) how can we make the job run the next business day?
2) How can we run a job on 25th of every quarter 7 AM(jan,apr,jul,oct)
And if 25th... (5 Replies)
Discussion started by: System Admin 77
5 Replies
10. Shell Programming and Scripting
Team,
Would like to know what is the best script that will send you an email if cronjob did not run.
Thanks (4 Replies)
Discussion started by: kenshinhimura
4 Replies
LEARN ABOUT DEBIAN
ftpwatch
FTPWATCH(8) System Manager's Manual FTPWATCH(8)
NAME
ftpwatch - Notifies you of changes on remote ftp servers
SYNOPSIS
ftpwatch
DESCRIPTION
ftpwatch is a program intended to be run as a cron job. Every user who wants to use it should install it into his crontab file. That is add
something like:
47 5 * * 7 /usr/bin/ftpwatch
The user should then create a .ftpwatchrc file. If one is found the specifed files and directories in that file will be dired, and the
result is stored as separate files in a .ftpwatch directory i the home directory. diff(1) is invoked to find any changes since last run.
If any are found, the output of diff is mailed to the user.
OPTIONS
-d<opt> passes the options in <opt> to diff when invoked to generate the change-repport sent to the user.
-p run ftp in passive mode
CONFIGURATION FILES
Each user can place a .ftpwatchrc file in there home directories, listing the files or directories they are intrested in. The format is
simpel. Each line of the file is of the following type:
<Host>:<File>
Where <Host> is the hostname of the ftp server and <File> is the file or directory to watch. If you instead want to watch an entire direc-
tory structure recoursly you can add an R to the config line of the dir whoes subdirs you are intresed in, like this:
<Host>:R:<File>
AUTHOR
Hakan Ardo <hakan@debian.org>
7 Januari 1997 FTPWATCH(8)