cron vs shell scripting


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting cron vs shell scripting
# 1  
Old 02-10-2011
cron vs shell scripting

hi...
im quite new in unix
been using it for 2 years
i got a job to monitor error/failure

my question is which is better to do a routine job
crond / shell script

the idea is to put all the command and make it append all the output to a txt/log file

tq in advance
# 2  
Old 02-11-2011

Best is a shell script executed by cron.
# 3  
Old 02-11-2011
Need to understand the differences

cron
Is a way of scheduling tasks to be executed regularly and at set/standard times

script
Is a set of unix commands together in a file. When executed, may print output, send email, convert data, etc..

So, most people create scripts to execute sets of commands again and again, without having to type all the specific commands repeatedly.
Many Sys Admins setup cron tasks to excute at pre-arranged times scripts that have been written.

Thus, I would think that you
(1) create a script with the various commands you want to execute while evaluating or monitoring.
(2) modify your cron file so your script is run at regular times.
# 4  
Old 02-13-2011
tq for ur explanation... i will consider it...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Shell script to read lines in a text file and filter user data Shell Programming and Scripting

sxsaaas (3 Replies)
Discussion started by: VikrantD
3 Replies

2. Shell Programming and Scripting

Need help with Shell Scripting and cron

Hi everyone, I'm doing a small project for my scripting class using cron and I've come to a point where I can't get the last echo command to work at all. I would like it to create a file in the /watcher folder with the given information and also, just to clarify, print the same time and date from... (3 Replies)
Discussion started by: millanboy
3 Replies

3. Web Development

Perl scripting or shell scripting?

i am going to study any one of the scripting languages mentioned above(shell 0r perl scripting) . Which is having more scope for a fresher? (1 Reply)
Discussion started by: Anna Hussie
1 Replies

4. What is on Your Mind?

Shell Scripting vs Perl scripting

Gents, I have been working in a Solaris/Unix environment for about 9 months. I took some linux classses online before getting the job. But, I am not very good at scripting. I want to learn how to script. Do you think that I should start with Shell scripting or Perl? I wanted to continue with... (2 Replies)
Discussion started by: Pouchie1
2 Replies

5. Android

Android Scripting Environment: Shell Scripting and Android

I just upgraded to Android 2.2 from 2.1. The GPS issue that was troublesome in 2.1 seems to have been fixed. Some of web browsing seems faster, but it could just be my connection is better today ;) Flash works in some browsers but not very good and it is too slow for Flash apps designed for... (0 Replies)
Discussion started by: Neo
0 Replies

6. What is on Your Mind?

Shell scripting vs Perl scripting

Hi all, I would like to start developping some good scripting skills. Do you think it would be best to start with shell scripting or Perl? I already got a fundation, really basics, in perl. but I am wondering what would be best to be good at first. Can you please help me determine which one to... (14 Replies)
Discussion started by: Pouchie1
14 Replies

7. Shell Programming and Scripting

Shell script and Cron

Hi there, I have a script that pulls in a weather feed via FTP then writes the output to a file. This script is run everyday at 3pm by cron. Heres the shell script: #!/bin/sh HOST='ftp.weatheronline.co.uk' USER='my username' PASSWD='my password'... (2 Replies)
Discussion started by: mpk_3
2 Replies

8. Shell Programming and Scripting

Call Shell scripting from Perl Scripting.

Hi How to call a shell scripting through a Perl scripting? Actually I need some value from Shell scripting and passes in the Perl scripting. So how can i do this? (2 Replies)
Discussion started by: anupdas
2 Replies

9. Shell Programming and Scripting

which one is better Run by Cron or Shell

Dear Experts, I have a script defined in Cron which runs every 1 minute. * * * * * /export/home/myscript.sh >/dev/null 2>&1 Now the issue is executing that myscript.sh sometime will take 2/3 or more minutes to finish execution. But after 1 minute cron will invoke another... (4 Replies)
Discussion started by: thepurple
4 Replies

10. Shell Programming and Scripting

difference between AIX shell scripting and Unix shell scripting.

please give the difference between AIX shell scripting and Unix shell scripting. (2 Replies)
Discussion started by: haroonec
2 Replies
Login or Register to Ask a Question