473,406 Members | 2,369 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

problem in running shell script from cron

#! /bin/bash



javac CopyFile.java
/usr/bin/java CopyFile



this is my shell script.when i call this script from terminal works fine.but through cron it gives me error saying exception i think it is not able to find the files that i have imported
such as
import java.io.*;
import java.util.*;
import java.lang.*;
import java.text.*;
import java.io.File;

help me out
Apr 15 '08 #1
2 2393
ashitpro
542 Expert 512MB
Have you redirected the output of your command...
Do it first and post the content of that file here...
Apr 15 '08 #2
gpraghuram
1,275 Expert 1GB
#! /bin/bash



javac CopyFile.java
/usr/bin/java CopyFile



this is my shell script.when i call this script from terminal works fine.but through cron it gives me error saying exception i think it is not able to find the files that i have imported
such as
import java.io.*;
import java.util.*;
import java.lang.*;
import java.text.*;
import java.io.File;

help me out
Check whether the JAVA path is set properly.
Try to write a small shell script and then set the JAVA path in it and then call the commad.
Set this shell script in a cron and i think it will work

Raghuram
Apr 15 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Gardner Pomper | last post by:
Hi, I am pretty new to python, so be gentle :) I have a python script that spawns a number of threads (configurable) on a 12 processor AIX RISC-6000 machine. It works fine, so long as I am...
3
by: Philippe Lang | last post by:
Hello, How can open a unix shell from a PLPGSQL function / trigger? I would like to send an email from a postgres database, and also send some unix commands to the server, through the...
10
by: lawrence k | last post by:
I've got a script called makeRss.php. It works fine if I try to open it with my browser. It makes an RSS feed for every page on my site. You can see it working here: ...
43
by: balakrishnan.dinesh | last post by:
Hi all, Im working in javascript, I want to use Ajax in javcascript, Can u tel me how to use ajax in javascript, whether i have to include any code as like to include *css or *.js file, what are...
1
by: sainathr | last post by:
Hi, I would like to run shell scripts with respect to the time mentioned in postgres data base tables. Postgres database should trigger the shell script for the time mentioned in the table. To...
1
by: akilageethal | last post by:
I am going to run a cron job to get a query executed daily. So i want to write a shell script for the cron job. What is the best way of doing that.??
1
by: pankajit09 | last post by:
Hello, I want to fire query at a database and then email the result to a user . This I want to do everyday automatically. I thought to use cron for it. If there is any other better way please...
6
by: lawrence k | last post by:
Suppose I have a PHP script that I call at the Linux command line (Ubuntu), and it gets all the paths to files and directories that exist inside of some directory. All this data gets stored in an...
1
by: vaskarbasak | last post by:
Hi All, how will i set shell script on cron tab to execute the script? please help me. Thanks! Vaskar
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.