Using Unix, How to rename a Autosys job? - unix

Is it possible to rename a Autosys job name using Unix commands?
For example :
Change the name of Autosys job : Job_morning_A to Job_evening_A.. What and how should I proceed?

There is no option to update a job name. In this case you have to delete the job using ‘delete_job’ and then run ‘insert_job’ with the updated name.

Related

I have hadoop 1.0.3, name node is not showing when I use jps command

I did all steps to create the multinode hadoop 1.0.3 set up. when trying to start all services using start-all.sh, namenode is starting but when trying to give jps command. inthe list namenode is displaying. can any one help me out this issue.
Please try to run Name node through shell command line "hadoop-demons.sh start namenode" and check the status

How to run a job dependent on another in csh unix

I have a job which is dependent on another job. Once the previous job is finished and the correspondent log file is created with EOJ at the end of the log, I have to look for the EOJ in the log. If found, my job would run.
I am running this in csh, AIX. Please help me the code for this.

Check Cron job ran in last 10 minutes

I have multiple scripts running in cron and my cron log is very flooded .
I just need to write a unix command to check if one particular scheduled script ran in last 10 minutes .
You can "touch" some file from script and check atime of this file.
Something like "touch -a /var/run/app.state" from cron script.
And for check you can use stat command with custom format to extract access time of file and calculate difference between now and this time.

cron job not creating logs

I am trying to execute some sql statements using an unix script. The script is placed in crontab to run everyday at 12.00 midnight and get the output in a log file.
Though my script is running and I can see the changes in DB but the log file is not generating. However manually running the script is generating the log file. Please suggest a solution.
now=`date "+%d%m%y"`
LOG="table_partition_$now.log"
test=`sqlplus -s ${USER}/${CPWD}#${DB} << THEEND > $LOG
...
...
...
exit
This is my code snippet. Please suggest
sqlplus has no closing `
Also, can you say whether the script runs correctly outside of cron? If it only fails in cron, you may want to call
env > /tmp/mylatestslog.txt
at the start and compare the differences with your local environment. (May be differences in the user, or variables used from you personal .bashrc).
(PS. also edited the question to show one command per line.)

Crontab : Running a jar file

I have a jar file that generates reports and i want to schedule to run it on every sunday,
For this purpose, i am using the crontab functionality on linux,
i have created the crontab entry using
crontab -e
45 15 * * 1 /usr/java/default/bin/java -jar /home/name/example/withouttimer.jar
but the job does not run as it should, Can you please help me find the issue with it,
Is there a way to check crontab logs?, thanks
Probably the profile used when running cron jobs does not have some variables set (JAVA_HOME? CLASSPATH?)
Do a crontab that does printenv > myfile.txt and check what is defined.
As a last test, create a .sh file and run it, that does
echo 'hello'
printenv
echo 'goodbye'
and see if redirecting the execution of your script to a log shows something.
That job runs at 3:45 pm on every monday (0 is for sunday)Are you sure you are checking it at right time?
Try running a dummy program at lesser interval to check whether its working.
Finally got the solution,
There was a couple of things that i was doing incorrectly,
The timezone of the server was different, so i had to set it accordingly.
The jar was not able to locate the input file(bad location), had to fix it.
Works gr8 now, thanks for the suggestion on adding MAILTO= , helped in debugging.

Resources