Crontab - how to make time range?

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Crontab - how to make time range?
# 1  
Old 11-09-2009
CPU & Memory Crontab - how to make time range?

im puting script in crontab, script is executing every 15min, every day, every monath

but i must make time range from 0:00 - 20:00 <> 20:30 - 0:00
or if i cant make 20:30 then 0:00 - 20:00 <> 21:00- 0:00

can i make it in single line like this?

7,22,37,52 0-23 * * *  >/dev/null 2>&1

# 2  
Old 11-09-2009
I do not get what you want. Instead of showing us your crontab entry, please explain what you want. As A general guess - you cannot do what you want in one line,
# 3  
Old 11-09-2009
Most versions of cron/crontab support lists. Have you tried something like
7,22,37,52 0-19,21-23 * * *  >/dev/null 2>&1

# 4  
Old 11-09-2009
Originally Posted by fpmurphy
Most versions of cron/crontab support lists. Have you tried something like
7,22,37,52 0-19,21-23 * * *  >/dev/null 2>&1

thanks for advice, i will try it Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need Time Stamp Range On Log Files

I have created this script #!/bin/sh FILES=/data/log/access_*.log for f in $FILES do echo "Processing $f file" cat $f | awk '{print $1}' | sort | uniq -c | sort -n | tail done It produces this output Processing /data/log/access_abc.log file 114 167 ... (38 Replies)
Discussion started by: sharingsunshine
38 Replies

2. Shell Programming and Scripting

awk - check time stamp between range or not

I want to check given time stamp is between the given time stamp or not. I am using AIX. YYYYMMDDHHMMSS abc.csv START TIME, END TIME 20130209018000,20130509022000 20120209018000,20130509022000 20120209018000,20130509022000 Script will check given time stamp is between above two range or... (2 Replies)
Discussion started by: vegasluxor
2 Replies

3. Shell Programming and Scripting

run script in time and date range

i need to run one script inside of other, and there is some terms - main script in scheduled in cron for everyday runing every 5min - i need to run /tmp/ after first 3 days in month - i need to run /tmp/ from 7-9AM, main script is runining all day all recommendations are... (1 Reply)
Discussion started by: waso
1 Replies

4. Shell Programming and Scripting

Make entries in crontab file

I have created a shell script "" and script should run after every 10 min., For that I will create below entry in the crontab file by using command crontab -e */10 * * * * /cdr/work/proc_raw/ >> /dev/null 2>&1 I wish to know whether above entry is correct or I have to make entry... (2 Replies)
Discussion started by: Devesh5683
2 Replies

5. UNIX Desktop Questions & Answers

grep a range of time & date

how can i grep a range? i have a text file with the following text: result.log.00:2012/01/02 12:00:07.422 LOG STARTED HERE N6Kashya29MemoryShieldScheduler_AO_IMPLE, pid=8662/8658, config=(alertThreshold=10,alertLevel=0,killThreshold=7200,coreThreshold=0,full=1), deltaTime=0,... (1 Reply)
Discussion started by: boaz733
1 Replies

6. Shell Programming and Scripting

grep - date & time range

Hi, I need to search email files by date & time range in email files. The timezone is not important. Can someone plz advise how i can do this ? For e.g A user can specify only A single date A date range date & time range Below is part of the email file. (4 Replies)
Discussion started by: coolatt
4 Replies

7. Shell Programming and Scripting

time stamp perl script error out of range 1..31

Hi, while running the perl script i am getting this error message , Day '' out of range 1..31 at line 44 what do iam missing in the script, any suggestion #!/usr/bin/perl use Time::Local; my $wday = $ARGV; my $month = $ARGV; # convert the month shortname into 0-11 number if... (4 Replies)
Discussion started by: saha
4 Replies

8. Solaris

problem to make a crontab -l

Hello everyone, this is the first i write in the forum, hope i can help , but now i have a problem There must be something wrong in my machine. I installed ( years ago ) an application (NEP) and when I try to show the backup scheduled in crontab the systems says i have no privilegies to do... (4 Replies)
Discussion started by: javierg
4 Replies

9. Shell Programming and Scripting

to get list of files of a perticular range of time

hi, how to list the files which has been created or accessed before 6 months thanks (1 Reply)
Discussion started by: useless79
1 Replies

10. Shell Programming and Scripting

Start time/end time and status of crontab job

Is there anyway to get the start time and end time / status of a crontab job which was just completed? Of course, we know the start time of the crontab job since we are scheduling. But I would like to know process start and time recorded somewhere or can be fetched from a command like 'ps'. ... (3 Replies)
Discussion started by: thambi
3 Replies
Login or Register to Ask a Question