Need to start a script from the point where it failed.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Need to start a script from the point where it failed.
# 1  
Old 09-25-2008
Need to start a script from the point where it failed.

Hi Guys,

I have requirement where if the script fails at a particular point, then the script should run from that particular point itslf..

could anyone help me out from this..

Thanks
# 2  
Old 09-25-2008
you mean you have a set of script which you are calling inside another script..
and if one fails the main script should start from where it failed last time right??
# 3  
Old 09-25-2008
Do you mean restart itself? Use exec $0
# 4  
Old 09-25-2008
yes vidaydar..

from the point it failed..
lets say the script failed while executing a select query.

THen next time it should start from the select query and follow the process..
# 5  
Old 09-25-2008
no era..
when i ran it manually, it should run from the point it failed..
# 6  
Old 09-25-2008
Sounds like "break up into small scripts, keep track of which ones completed, run the rest".
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Snmpd service failed to start on Red Hat 6

Dear community, I got the following error when I try to start the snmpd service: # service snmpd start Starting snmpd: Log say: Could someone help please? Thank you Lucas ---------- Post updated at 08:07 AM ---------- Previous update was at 07:50 AM ---------- DAMN!!!!... (2 Replies)
Discussion started by: Lord Spectre
2 Replies

2. Solaris

Failed to Start Xampp Apache on Solaris 10

Hello Hope someone can help me on my issue. I tried to install Xampp. all are working fine except Apache. I edited xampp starting script file by modifying port from 80 to 2110. the same for /opt/xampp/etc/httpd.conf I change listing port from 80 to 2110 root@mtcksafhtest01 # ./xampp... (2 Replies)
Discussion started by: samer.odeh
2 Replies

3. Shell Programming and Scripting

How to perform a hexdump using dd from start point to end point?

hi, I would like to ask or is it possible to dump a hex using dd from starting point to end point just like the "xxd -s 512 -l 512 <bin file>" I know the redirect hexdump -C but i can't figure it out the combination options of dd. Hope someone can share their knowledge.. Thanks in... (3 Replies)
Discussion started by: jao_madn
3 Replies

4. Shell Programming and Scripting

deleting the part of the file(overwrite) using start and end point

here is the contents of bigfile.sql CREATE TABLE `Table11` ( `id` int(11) NOT NULL , `entityName` enum('Lines','EndUsers') COLLATE utf8_unicode_ci NOT NULL, `parentAllianceMigrationProjectId` varchar(255) NOT NULL ) ENGINE=InnoDB AUTO_INCREMENT=2000 DEFAULT CHARSET=utf8... (30 Replies)
Discussion started by: vivek d r
30 Replies

5. UNIX and Linux Applications

MySQL Daemon failed to start - no mysql.sock file

After doing a yum install mysql mysql-server on Fedora 14 I wasn't able to fully install the packages correctly. It installed MySQL 5.1. I was getting the following error when running the: mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)... (3 Replies)
Discussion started by: jastanle84
3 Replies

6. SCO

SLD: Failed to start the PMD Connection thread. (PM_THREAD_FAILED_TO_START).

Hello, I have a client with an 18 year old SCO Openserver 5.0.5 server. They can't find their installation media. They are experiencing an error at login: *LOGIN: ERROR- Failed to initialize policy manager. (IFOR_PM_FATAL) The status from the policy manager daemon (PMD -... (10 Replies)
Discussion started by: brhunt
10 Replies

7. Red Hat

VSFTPD Service Failed to Start

Today I have installed VSFTPD but service is failing to start. We have been using standard FTP successful but need to introduce an FTPS option. I have run YUM install VSFTPD and everything appeared to load ok. (If I run rpm - qa | grep vsftpd I get vsftpd-2.0.5-16.el5_4.1 which I... (4 Replies)
Discussion started by: PaulComins
4 Replies

8. Red Hat

vsftpd service failed to start

hi, i am using RHEL 5 and i am not able to on the vsftp i have tried to on the vsftp service using command service vsftpd start Starting vsftpd for vsftpd: i am posting the content of my /etc/xinetd.d/vsftpd file # description: The vsftpd FTP... (2 Replies)
Discussion started by: u.n.i.x
2 Replies

9. Shell Programming and Scripting

Set start point in script

Does anyone know of a way to set up some sort of marker in a shell script, from which the script can be restarted.. e.g. MARKER1 check env variable MAX_RETRY if var not set then while true do check var if set go to MARKER1 ... (2 Replies)
Discussion started by: handak9
2 Replies

10. UNIX for Advanced & Expert Users

Fibre connection Point to Point SUN

Anyone know of a guide or instructions for Solaris I got to configure a SBUS HBA to talk to a tape robot. I have done this on a switch but not point to point. just going HBA >>>>> TAPE Fibre simple two nodes Kie (6 Replies)
Discussion started by: kie
6 Replies
Login or Register to Ask a Question