executing a cron


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting executing a cron
# 1  
Old 03-30-2007
executing a cron

Hi Gurus

I have a requirement to execute a cron job every 30 min until 8pm in the night and again start at 8 am in the morning. How would I add the cron entry for this requirements. all inputs are appreciated.

Thanks in advance
# 2  
Old 03-30-2007
Quote:
Originally Posted by ragha81
Hi Gurus

I have a requirement to execute a cron job every 30 min until 8pm in the night and again start at 8 am in the morning. How would I add the cron entry for this requirements. all inputs are appreciated.

Thanks in advance
I think basically the job should every 30mins from 8AM-8PM...May be one way of doing is ...

30 08-20 * * * your job > log path
# 3  
Old 03-30-2007
OP had mentioned every 30 mins

so this command would run for

9 30
10 30

isnt that ?
# 4  
Old 03-30-2007
Quote:
Originally Posted by matrixmadhan
OP had mentioned every 30 mins

so this command would run for

9 30
10 30

isnt that ?
even i was thinking may be like

30 08,09,10,11,12,13,14,15,16,17,18,19,20 * * * <job to be executed>

lets see what gurus thinkg here.....
# 5  
Old 03-30-2007
it should be something like

Code:
30,60 08-20 * * * your job > log path

# 6  
Old 03-30-2007
Quote:
Originally Posted by matrixmadhan
it should be something like

Code:
30,60 08-20 * * * your job > log path


Oops!!! May be your command might work for him...Thanks for the correction.....
# 7  
Old 03-30-2007
thanks guys. I have just implemented the cron. Will let you know if it works.. thanks
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Script is not executing as expected when I schedule it in cron

Hi, I have a shell script which fetches the MRP status and the LAG status. When I execute it manually like, sh <script_name>, it fetches the output as expected, but when I schedule through crontab, it's not working as expected. Any help would be really appreciated. Here is the code... (3 Replies)
Discussion started by: Nagaraj R
3 Replies

2. Shell Programming and Scripting

Expect script not executing via cron

Hello All, I'm having an issue getting an expect script to run as a cron job. The script executes fin if I run it from the command line but I get nothing when trying to run it as a cron job. I've researched other forums and threads and there have been references to the environment, or lack... (16 Replies)
Discussion started by: KingT617
16 Replies

3. Shell Programming and Scripting

Script not executing using cron

Hi, I created a script which connects to database and update a table. This script is running fine when i run it manually but when i am trying to execute it scheduling in crontab.script is executing but Data is not getting updated. below is my script sqlplus test/##### >> test_feed.log <<!... (6 Replies)
Discussion started by: sv0081493
6 Replies

4. UNIX for Dummies Questions & Answers

Cron shell script not executing diskutil command

I'm trying to learn how to use cron for repetative tasks. I have an external disk that needs to be unmounted and remounted every hour due to some problems that a backup utility (specifically, TimeMachine) is having repeatedly accessing the device. I've created a shell script that will find the... (3 Replies)
Discussion started by: illuminate
3 Replies

5. UNIX for Dummies Questions & Answers

Executing python scripts via cron job

Hi, I'm executing a python script via cron job. The way it is set up is, I'm editing a file called local00 22 * * * root su - -c "/opt/setup_dir/bin/run_bkp -p" When this job executes, the command-specific logfile and the syslog (where the logs are supposed to go) show half of the logs(no... (2 Replies)
Discussion started by: ashwini.engr07
2 Replies

6. UNIX for Dummies Questions & Answers

Cron Jobs Not Executing

Hi Guys, Good day! I don't know what's the problem with this, I have two (2) entries in Crontab, these 2 entries are scripts which I've created. I need these 2 for automatic backup and maintaining only 3 files under a given directory. Here are my entries below, and they are NOT executing: 00... (7 Replies)
Discussion started by: rymnd_12345
7 Replies

7. Shell Programming and Scripting

Cron job not executing

I need to add 10 records to database from a file /tmp/authlist.log(contains insert into table sql commands) When i execute the following script manually its executing and working fine. the same is not getting executed when i try to execute using crontab vi /tmp/test1.sh #!/bin/sh... (4 Replies)
Discussion started by: kalyankalyan
4 Replies

8. Shell Programming and Scripting

Problem with executing a shell script through the cron

Hi, I have a shell script as below: ORACLE_HOME=/usr/local/opt/oracle/product/dev export ORACLE_HOME PATH=$PATH:$ORACLE_HOME/bin:/usr/bin export PATH OUTFILE=/export/home/`basename $0`.out export OUTFILE export IDEN df -k . | tail -1 | read a b c d e f echo $a >> $OUTFILE echo $b... (4 Replies)
Discussion started by: Abhinav Pandey
4 Replies

9. UNIX for Dummies Questions & Answers

Problem with executing command inside a cron job

Hi All, I have scheduled a script in cron which writes output to the below file. ....>> /data/Target/wrapper_invoke_ds_job_`date '+%Y%m%d'`.ksh_out 2>&1 But the date command is not getting resolved in the format specified. It just resolves to the following. wrapper_invoke_MQ_ds_job_Tue... (3 Replies)
Discussion started by: pkm_oec
3 Replies

10. HP-UX

executing shell script from the cron

This isn't the usual problem that a shell script runs from the command line and not the cron. It's a little different. Among other things, the shell scrip executes my .profile to set a bunch of variables. It then does an env to ensure that it ran OK. There are echos in the shell script and... (2 Replies)
Discussion started by: abNORMal
2 Replies
Login or Register to Ask a Question