Sponsored Content
Top Forums Shell Programming and Scripting automatically restart scripts Post 302422606 by zaxxon on Wednesday 19th of May 2010 01:23:35 AM
Old 05-19-2010
To have scripts executed periodically you can use cron which is described in depth here: https://www.unix.com/answers-frequent...n-crontab.html

When you got the PID you can hand it over to kill with the command xargs for example. Best write your script so that it is able to accept parameters like [start|stop|restart], ie. check $1 with a case/esac statement. This will make it more versatile.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to run three scripts one after another automatically???

Hi !! How do u run three scripts one after another automatically using crontab command at some specified regular interval. Say i have three scripts A,B,C and i want to run the three scripts A followed by B followed by C. REQUIRE HELP URGENTLY Thanks in advance Arunava . (3 Replies)
Discussion started by: arunava_maity
3 Replies

2. Shell Programming and Scripting

Scripts for calculating size and remaining space of a directory automatically.

I would like to create a script for calculating size and remaining space of a directory automatically every 24 hours, then send an email to report to the admin. * POSIX and PERL are preferred. Can anyone help, please? (1 Reply)
Discussion started by: leonall
1 Replies

3. Shell Programming and Scripting

Running shell scripts automatically without using Batch or at commands

I have been trying to run a unix script which contains many sql statements.I need to run this script every monday morning. I tried to run on command prompt, it works fine. But while I run it via batch or at command., it returns with library module could not be loaded (libcompat.1.o could not be... (3 Replies)
Discussion started by: ritzwan0
3 Replies

4. Shell Programming and Scripting

need help to write script to check the process health and automatically restart it

I am working on a project, which need to constantly watch the process, and check its status, if it was dead, it should be restart automatically. Please kindly refer me to URL which teach how to write this kind of script, or service. Thanks. (1 Reply)
Discussion started by: dragondad
1 Replies

5. Shell Programming and Scripting

How can I make a program start up automatically after the computer restart/startup?

hi all How can I make a program start up automatically after the computer restart/startup in fedora? something like: ... Establish a shell then run some of command code. Thanks for Help!! (1 Reply)
Discussion started by: munna_dude
1 Replies

6. UNIX for Dummies Questions & Answers

Automatically Running Scripts

Can someone advise me how to get started automatically running scripts? I believe it has something to do with cron? (4 Replies)
Discussion started by: jeffreydavisjr
4 Replies

7. Shell Programming and Scripting

Changing the Bash Scripts to Bourne Scripts:URGENT

Hi, I have to write a program to compute the checksums of files ./script.sh I wrote the program using bash and it took me forever since I am a beginner but it works very well. I'm getting so close to the deadline and I realised today that actually I have to use normal Bourne shell... (3 Replies)
Discussion started by: pgarg1989
3 Replies

8. Shell Programming and Scripting

KSH - How to call different scripts from master scripts based on a column in an Oracle table

Dear Members, I have a table REQUESTS in Oracle which has an attribute REQUEST_ACTION. The entries in REQUEST_ACTION are like, ME, MD, ND, NE etc. I would like to create a script which will will call other scripts based on the request action. Can we directly read from the REQUEST_ACTION... (2 Replies)
Discussion started by: Yoodit
2 Replies

9. HP-UX

Unix server restart automatically

We have HP K class unix server, It's automatically restart the server. (10 Replies)
Discussion started by: ganesh24pal
10 Replies

10. Shell Programming and Scripting

Automatically determining directory path for scripts and programs

I have some C++ code in the following directory structure /home/chrisd/tatsh/trunk/hstmy/ ├── baseLib ├── bin │ ├── awk │ ├── bash │ ├── diag │ ├── ksh │ │ └── TAG201011 │ ├── old │ ├── perl │ ├── prog │ ├── py │ └── tcsh ├── docs ├── fortran ├── others... (0 Replies)
Discussion started by: kristinu
0 Replies
gdm-restart(1m) 						   User Commands						   gdm-restart(1m)

NAME
gdm-restart, gdm-safe-restart, gdm-stop - stop or restart GDM SYNOPSIS
gdm-restart gdm-safe-restart gdm-stop DESCRIPTION
gdm-restart stops and restarts GDM by sending a HUP signal to the GDM daemon. This command immediately terminates all sessions and logs out users currently logged in with GDM. gdm-safe-restart stops and restarts GDM by sending a USR1 signal to the GDM daemon. GDM is restarted as soon as all users log out. gdm-stop stops GDM by sending a TERM signal to the GDM daemon. FILES
The following files are used by this application: /usr/bin/gdm-restart Executable to stop and restart GDM /usr/bin/gdm-safe-restart Executable to stop and restart GDM safely /usr/bin/stop Executable to stop GDM ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-display-mgr | +-----------------------------+-----------------------------+ |Interface stability |Volatile | +-----------------------------+-----------------------------+ SEE ALSO
Latest version of the GNOME Desktop User Guide for your platform. gdmXnestchooser(1), gdmdynamic(1), gdmflexiserver(1), gdmphotosetup(1), gdmthemetester(1), gdm(1m), gdmsetup(1m), attributes(5) NOTES
Written by Brian Cameron, Sun Microsystems Inc., 2004, 2006. SunOS 5.11 1 Sep 2004 gdm-restart(1m)
All times are GMT -4. The time now is 05:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy