Automatically Running Scripts


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Automatically Running Scripts
# 1  
Old 11-01-2006
Automatically Running Scripts

Can someone advise me how to get started automatically running scripts? I believe it has something to do with cron?
# 2  
Old 11-01-2006
Quote:
Originally Posted by jeffreydavisjr
Can someone advise me how to get started automatically running scripts? I believe it has something to do with cron?
cron is designed for periodically scheduling
init (/etc/init.d/) for automatically starting scripts during system startup, depends on what you want (console, GUI... system's run level)

what do you want?

--
Vladimir
Nothing but Unix
http://unix-news.blogspot.com/
# 3  
Old 11-01-2006
Quote:
Originally Posted by nonkey

what do you want?

--
Vladimir
Nothing but Unix
http://unix-news.blogspot.com/
Well I have some scripts that I run manually everyday. I was wondering if it was possible to get these scripts to automatically run at say 4:30am every mourning.

I am using UNIX Sco 5.0.6. Thanks.
# 4  
Old 11-01-2006
Quote:
Originally Posted by jeffreydavisjr
Well I have some scripts that I run manually everyday. I was wondering if it was possible to get these scripts to automatically run at say 4:30am every mourning.

I am using UNIX Sco 5.0.6. Thanks.
Usually /etc/crontab file contains configuration for cron daemon, which schedule scripts or programs according to it.

To automate running scripts at 4:30am every day you must write string to crontab file something like:

30 4 * * * * user /home/user/script.sh

First column - minutes, second - hours (24-h format)

You can setup any time to within 1 minute (if you need seconds - you can run 'sleep' or so at the script).


--
Vladimir
Nothing but Unix
http://unix-news.blogspot.com/
# 5  
Old 11-19-2008
Executing scripts when unix is restarted

Vladimir

can you please tell me how to execute a script as soon as unix is booted.

I think crontab won't be helpful in this scenario.

Regards
Atin Sood
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Scheduled job not running automatically in crontab

i have a job scheduled in crontab. The problem is, it is not running automatically as per the time scheduled. But runs when executed manually. What would be the problem? Help me with this please. (6 Replies)
Discussion started by: Santhosh CJ
6 Replies

2. Shell Programming and Scripting

Running script automatically when threshold limit met in one of the field in oracle database

Hi Guys, Need you help in one point! I am working on one shell script which takes following steps : 1. Taking one query result from oracle database 2. Exporting that result to Xls file 3. Mailing that file to my own mail ID Now, I want to give a threshold limit to one of the column... (0 Replies)
Discussion started by: Agupte
0 Replies

3. 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

4. UNIX for Dummies Questions & Answers

search history without result running automatically

Hi I want to search the history of commands. for the last use of eg.$ service httpd reload $history = brings up the full list $!serv = runs service httpd reload, if thast was the last command used with the string $!?serv? = does the same as above I do not want to run the command... (1 Reply)
Discussion started by: dunsta
1 Replies

5. Shell Programming and Scripting

automatically restart scripts

I am new to AIX shell scripting, please help...... I want to write a automatically restart script for one of my application. For example, the application name: ABC (you can see its ID from ps -ef | grep ABC). It can be started by ABC.sh file but it has to be stopped by using "ps -ef | grep ABC"... (2 Replies)
Discussion started by: jsmitha2009
2 Replies

6. Shell Programming and Scripting

Running scripts within scripts from cron

Hi all, I have set up a cron job which calls another shell script shell script which in turn calls a Java process. The cron tab looks so. 0,30 7-18 * * 1-5 /u01/home/weblogic/brp/bin/checkstatus.sh >> /u01/home/weblogic/logs/checkstatus.log The checkstatus.sh scripts looks like this. ... (4 Replies)
Discussion started by: sirbrian
4 Replies

7. 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

8. 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

9. Shell Programming and Scripting

Running a program automatically

How can I make a program run automatically at a certain time of day? My problem is I need to make a small backup program that will back up a few files every day? (3 Replies)
Discussion started by: jvadn0
3 Replies

10. 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
Login or Register to Ask a Question