crontab execution


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting crontab execution
# 1  
Old 05-14-2008
crontab execution

is it possible to soecify time overnight in 5 days for example:

0 18-7 * * 1-5 /mycode

is this okay to use 18-7 because im not getting the results correctly?
# 2  
Old 05-14-2008
Try this instead:

0 0-7,18-23 * * 1-5 /mycode
# 3  
Old 05-14-2008
Then again, what are you trying to do?

My solution does morning and evening of each weekday.

My solution may not be what you really want.

You may need to split it into 3 lines. 1 for Monday evening, 1 for Tuesday thru Friday, morning and evening, and 1 for Saturday morning.

I.E.:

0 18-23 * * 1 /mycode # Monday Evening
0 0-7,18-23 * * 2-5 /mycode # Tue thru Fri, Morning & Evening
0 0-7 * * 6 /mycode # Saturday Morning
# 4  
Old 05-15-2008
Quote:
Originally Posted by Dave Miller
Then again, what are you trying to do?

My solution does morning and evening of each weekday.

My solution may not be what you really want.

You may need to split it into 3 lines. 1 for Monday evening, 1 for Tuesday thru Friday, morning and evening, and 1 for Saturday morning.

I.E.:

0 18-23 * * 1 /mycode # Monday Evening
0 0-7,18-23 * * 2-5 /mycode # Tue thru Fri, Morning & Evening
0 0-7 * * 6 /mycode # Saturday Morning
Thank you i think i will go with slpitting becase i think this was going to end Saturday Morning...
# 5  
Old 05-15-2008
As I was driving home last night, the thought popped into my head that it only needs two lines:

0 18-23 * * 1-5 /mycode # Monday thru Friday Evening
0 0-7 * * 2-6 /mycode # Tuesday thru Saturday Morning
Image
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. HP-UX

Crontab Execution

Hi Guys, I need help to clear my doubt w.r.t Crontab execution. uname -a HP-UX myservername B.11.31 U ia64 1422528451 unlimited-user licenseI created a crontab entry to execute particular job on Saturday 11/15/2014 11:22 Below is the cron entry #refresh DEVDB from PRODDB 22 11 15 11 6... (6 Replies)
Discussion started by: rocky.community
6 Replies

2. UNIX for Dummies Questions & Answers

Execution Problems with Crontab

Dear Folks, I have written a shell script which internally connects to oracle database through sqplplus command line. The script runs fine when run manually. Now I am scheduling it to run (Linux environment) from crontab. In crontab it is failing with an error: sqlplus command... (6 Replies)
Discussion started by: tamojitc
6 Replies

3. Shell Programming and Scripting

Problem with Job execution using crontab

Hi All, I am facing a problem with crontab.I made an entry in crontab like this 05 07 * * * /afs2/cdwfullacc/current/exe/cdw_generate_special_klant.sh > /afs2/cdwfullacc/current/scratch/cdw_gen_cron.log But job was not getting executed. Entry in crontab was made with same user by whom... (4 Replies)
Discussion started by: krishna_gnv
4 Replies

4. Shell Programming and Scripting

Execution of Unix script after every second without crontab

Hi, I have shell script "A" which is executing oracle pl/sql procedure and initiate its multiple threads at a time as below on given user value in an other script "B". I want to execute script "A" after every second with out cron tab as " A " will keep on executing after every second till... (1 Reply)
Discussion started by: saad.imran@gmai
1 Replies

5. Shell Programming and Scripting

Expect Issue Serial Forground Execution vs Concurrent Background Execution

I have an expect script that interrogates several hundred unix servers for both access and directories therein using "ssh user@host ls -l /path". The combination of host/path are unique but the host may be interrogated multiple times if there are multiple paths to test. The expect script is run... (2 Replies)
Discussion started by: twk
2 Replies

6. UNIX for Dummies Questions & Answers

Problem with Crontab execution

Hi I have shell script to excute the SQL script.And i have scheduled those shell script in crontab.But the Shell script is not running timely and i got the below error Crontab entry 15 05 17 7 * /export/home/vcpsapp/vcps/stat.sh Output Your "cron" job on uspxivus16... (3 Replies)
Discussion started by: mak_boop
3 Replies

7. UNIX for Dummies Questions & Answers

Unscheduled crontab execution

Hi All, Do apologise, for it has been a long while since I was last on the forum. I've been doing documentation and primiarily Windows efforts for some while now. :( We are running a HP-UX 11.23 unit. This morning two separate crontab users executed shutdown scripts of their respective... (14 Replies)
Discussion started by: Cameron
14 Replies

8. UNIX for Dummies Questions & Answers

Execution problems with crontab

I need your help please Inin a production system i found crontab entries was removed because i typed crontab -l with username corasc and didn't show anything. i asked the administrador to restored the mentioned crontab, he restored the crontab: The problem is when restored the crontab file is... (2 Replies)
Discussion started by: alexcol
2 Replies

9. Shell Programming and Scripting

execution without ./

I want to execute a shell script without ./ symbol. For example: ./my_script ===== my_script (both of them can execute my script) both of them are the same as result. (7 Replies)
Discussion started by: mehmetned
7 Replies

10. UNIX for Dummies Questions & Answers

execution without using (./)

I want to execute a shell script without ./ symbol. For example: ./my_script ===== my_script (both of them can execute my script) both of them are the same as result. (2 Replies)
Discussion started by: mehmetned
2 Replies
Login or Register to Ask a Question