Hello there!
Maybe you could use a shell script in order to accomplish that task.
This is how I thought about it:
From 5 a.m to 7.am there are 2 hours, then 7200 seconds.
You want to run the
action every 5 seconds, then you need to run it 1440 times.
So, you could try something like the following:
Say you save this script as filename
Then, all you have to do now is to configure your crontab to run this script at exactly 5 a.m (one time only). Something like this:
That action will last till 7 am.
Hope it helps and I hope someone points a better solution too.
How long does it take to run your mysql command? How much variation is there in the time it takes to run your mysql command?
If you want to run your command 12 times/minute, don't you want the seconds in output filename? As in:
If not, the output from the first 11 times you run it will be overwritten by the last time it runs in that minute?
Or, didi you intend to store the output of running your command 12 times in each file with the output from later runs appended to the file instead of replacing the previous contents? As in:
Hi,
1)
If some job supposed to run on 1st of every month at 7 AM
In cron job when we have a blackout on the 1st ( i.e when 1st falls on a sunday ) how can we make the job run the next business day?
2) How can we run a job on 25th of every quarter 7 AM(jan,apr,jul,oct)
And if 25th... (5 Replies)
Hi ,
I have removed a cron for particular user , but cron job seems to be running even after the cron entry is removed. The purpose of the cron was to sendmail to user ( it uses mailx utility )
I have restarted cron and sendmail service still user is getting mail alerts from the cron job. And... (4 Replies)
Hello,
I'd like to set a cron job that runs a shell script every 30 minutes or so to restart a java based service if the memory gets above 80%. Any advice on how to do this?
Thanks in advance!
- Ryan (19 Replies)
Hi All,
I have got a shell script that excutes some job and mails me the output as an attachment.
While running the script manually, its perfect.
when i am scheduling the job through crontab, i am getting the mail.
but the attachment but this is a blank file.
after the scheduler run, i can... (2 Replies)
I would like to setup a Cron job to check weather X process is running or not. if it is not running then start that X process with a log message....
can any one help writing a script?
thanks (3 Replies)
I run cron in solaris 10 zone. One cron job which syncing files to nfs mounted on container, creates after finishing another cron proccess(/usr/sbin/cron), and after 100 existing cron proccesses next cron job will not start. It's too weird for me, I'm not able to solve this problem. Theoretically... (3 Replies)
Hi,
Thanks in advance.
i need to kill a unix background running job after that job process completes.
i can kill a job by giving the following unix command
kill -9 processid
how to kill the job after the current process run gets completed ?
Appreciate your valuable help.
Thanks... (7 Replies)
Hi,
Thanks in advance.
i need to kill a unix background running job after that job process completes.
i can kill a job by giving the following unix command
kill -9 processid
how to kill the job after the current process run gets completed ?
Appreciate your valuable help.
... (1 Reply)