I have a scripts which does many task like house keeping, moving file to different location and loading the data into oracle.
I run this scripts daliy manually , I decided to put it into cron. I have put the scripts into crantab but the behaviour of the scripts have changed. it moves the files as it has been coded but donot call oracle loader to load the data. when running manually it can do all the work as per the code.
Most of the problems with crontab execution are related to the differences between the interactive and non-interactive environment.
Try adding the PATH and/or the other related variables present in your initialization files (profile and rc files) in the failing shell script explicitly.
Advice: Always use the whole path to a command in the cron and the script the cron calls.
When calling a particular command, let's say grep, always give it the whole path to the command.
grep is a good example of this because there are multiple versions of it installed on most systems and each as different commandline switches.
Typically when this is the case the man page for that utility in question will give you the whole path of each version. As an example, here is the first portion of the man page in Solaris for the grep Utility:
As you can see there are two different versions available, and depending on which one you call, you have different options on how to use it.
Also, please note that only one of these is, by default, in you're path so if you want to use the other, more powerful, version (the one in user/xpg3/bin) you have to call it by the whole path. Especially when scripting with it.
Hi Experts,
I am new to Autosys. I created a Autosys box job to run at 10 AM daily. As scheduled, the job starts on time.
There is another box job inside the box. I have scheduled it to run at 11 AM but it kicks off automatically with the main job at 10 AM.
insert_job: Main-job ... (2 Replies)
Hi All,
I have a script which will restart some web server and bring it up again. For that I need to retrieve 3 password from CyberArk (Cyber-Ark - Wikipedia, the free encyclopedia) vault.
My question is:
Is this possible to schedule the script through cron and automatic password... (0 Replies)
Hi All,
I am facing a problem with crontab.I made an entry in crontab like this
05 07 * * * /afs2/cdwfullacc/current/exe/cdw_generate_special_klant.sh > /afs2/cdwfullacc/current/scratch/cdw_gen_cron.log
But job was not getting executed.
Entry in crontab was made with same user by whom... (4 Replies)
Hi All,
Pardon me if this turns out to be a dumb question. But I am trying to schedule a cron job for a my script which takes input options. So an entry in crontab would be something like:
1 * * * * run_report.sh -o out.csv -m monthly -e somename@email.com > cron_output.log 2> cron_error.log... (3 Replies)
Hi,
I have a script that finds the application logs from the previous day and sends it to another server via ftp.
The code is something like this:
yest_date=`TZ=CST+24 date "+%b %d"`
logdir=/app/logs
logs=app*.log
tmpdir=/tmp
cd $logdir
for i in `ls -1 $logs`
do
chkstr=`ls -1l $i | grep... (2 Replies)
I hv a crontab job (script) that can be run normally , now I try to run it on the shell but can't be run , can advise what is difference between run a script on crontab and run it manually ? is it the difference of system enviornment ?thx
I tried to fix it by below method ,
I write a script... (3 Replies)
Hi,
I want to schedule the scripts/batches to run simultaneously. I had all the information in the config (flat)file, which contains script name, time, dependency, path, priority and status etc.,
I want to run the jobs parellelly and some jobs are required to give the input. How can I do this?... (1 Reply)
Hi Gurus,
I'm looking for a real Jobs Scheduler Agent-based.
My customer is using cron, but need something a little bit clever, where
you could configure chain of process ("script x will run if script y is
finished", etc). Of course I know solutions like control-M (from BMC... (1 Reply)