Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Problem with a script in crontab Post 302528990 by pludi on Wednesday 8th of June 2011 10:22:59 AM
Old 06-08-2011
The problem most likely is that you're including '.' (the current directory) in the classpath, but cron usually starts a script using /tmp or /var/tmp as the current directory. cd to your home directory first, after that it should work as intended.

If not, please post a meaningful error message, for example the message cron sends as email when a process fails.
This User Gave Thanks to pludi For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Problem with executing a script scheduled in crontab

Hi I have written a shell script(in Solaris) in which following logic is there..... i=1 while read control do key=`echo $control | awk -F$DELIMITOR '{ print $1 }'` echo "Key Values" ${key} i=`/usr/bin/expr $i + 1` done < $CONFPATH/$CONFFILE when i execute it at prompt it... (4 Replies)
Discussion started by: Amardeep
4 Replies

2. Solaris

Unix script Problem with crontab

Hi Experts, Am facing some problems with script (Sun solaris 9). My script (sqlplus.sh)looks like this. . . ............................................... set 'date' dd=$3 export dd mon=$2 export mon yyyy=$6 export yyyy cd /oracle/P47/saparch... (8 Replies)
Discussion started by: vrjalli
8 Replies

3. Shell Programming and Scripting

problem running shell script (for oracle export) in crontab

Hello Gurus, I've been tasked with solving a problem at my new job and I'm stumped. We've got a script that dynamically builds an oracle export parameter files and then runs export from the shell. it runs fine when using the shell, but will NOT run (fails in one spot everytime) when entered... (1 Reply)
Discussion started by: jsheehan223
1 Replies

4. UNIX for Dummies Questions & Answers

Variable problem in script when using crontab

Hi, this is my first shell script. Anyway i am trying to ftp files from one machine to another. The name of the script is ifsftp_orabkp. The code is as follows: HOST="122.122.122.22" USER="ftp_ftp" PASSWD="ftp.222222" Y1=`(perl -e '@y=localtime(time());printf... (11 Replies)
Discussion started by: dazz
11 Replies

5. Linux

Problem with crontab + bash script

Crontab: 16 14 * * * /root/bin/./empty_mail.sh >> /root/bin/log.txt L=`mailq |grep -c frozen` echo "${NUMMAIL} frozen mail to be removed from the mailq" #echo "Press Enter to continue" #read CONTINUE echo -en "-> " for i in `mailq | grep frozen | awk '{print $3}'` ; do exim4 -Mrm $i... (1 Reply)
Discussion started by: wessberg
1 Replies

6. Shell Programming and Scripting

Problem with crontab running a script

I am trying to use the CRON utility in Fedora 11 & CentOS... I intend to run a script which pops up a warning message every hour and i made the following entry using "CRONTAB -e " * * * * * sh /bin/myscript.sh But this does not seem to be running. Another thing to note is that,... (4 Replies)
Discussion started by: Vabiosis
4 Replies

7. Solaris

crontab problem

online* 22:25:22 svc:/system/cron:default cron service not able to start i tried to disble it is not working. showing online* status. thanks (1 Reply)
Discussion started by: sunnybee
1 Replies

8. HP-UX

Problem with script arguments in crontab

I have a script scheduled in cron as shown below. 16 12 * * * /users/mydir/bin/process_master.ksh `date '+%Y%m%d'` >> /users/mydir/process_master.out This script executes correctly when invoked on command line, but doesn't work the same when scheduled in crontab. Crontab is working fine... (3 Replies)
Discussion started by: mk1216
3 Replies

9. Shell Programming and Scripting

Problem with perl script on crontab

Hi everybody, I have a perl script. I want to run it as a cron job every 10 minutes. I insert the command into crontab , using crontab -e. The problem is, I didnt get any output from script inside crontab, whereas when I run it manually through 'perl myscript.pl' it running well. Here is the cron... (2 Replies)
Discussion started by: franzramadhan
2 Replies

10. Solaris

Script problem when running on crontab

Hi guys! I created a backup script that works fine when I run manually, but when I put a crontab job to execute it the result are not the expected. (not a time problem). Here is my script: bash-3.00# cat /bk_tool/backup2.sh #!/usr/bin/csh clear set DIR_HOST='SCP08' ... (3 Replies)
Discussion started by: andredemartini
3 Replies
2004-04-15

      mailping

      0.0.4

MAILPING-STORE(1)						     Mailping							 MAILPING-STORE(1)

NAME
mailping-store - store email from stdin to a mailping incoming maildir SYNOPSIS
mailping-store DESCRIPTION
mailping-store reads an email from standard input and writes it into a maildir chosen according to following logic: 1. If EXTENSION is not set, select Maildir. 2. If EXTENSION is set, ensure its value is safe to use, and select EXTENSION/incoming. mailping-store is usually run from a .forward file, and thus the filenames above are relative to the home directory of the account in question. Normal use Normally, mailping-store is used to ease the setup of new circuits to probe from mailping-cron. This is done with a system account mailping using <mailping@yourhost.example.com> as the from address, and <mailping+circuitname@yourhost.example.com> (or some remote address aliased to that) as the to address. In fact, these are the default values for from and to, so you can just skip creating those configuration files. This allows adding new test circuits without any changes to the email configuration. FILES
/var/lib/mailping/state/circuit/incoming Maildir to store the email to. /var/lib/mailping/state/Maildir/ Maildir to store the email to, if no extension was given. ENVIRONMENT
MAILPING_STATEDIR Override the location of the state directory. Circuit states are stored in the state subdirectory of this directory, in subdirectories named after the circuit name. Default: /var/lib/mailping EXTENSION Name of the current circuit to store the mail for. SEE ALSO
mailping-cron(1), mailping-success(1), mailping-latency(1) AUTHOR
Tommi Virtanen <tv@havoc.fi> Havoc Consulting Author. COPYRIGHT
Copyright (C) 2004 Havoc Consulting mailping 0. 2004-04-15 MAILPING-STORE(1)
All times are GMT -4. The time now is 06:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy