Solved

Time

Posted on 1998-10-29
3
149 Views
Last Modified: 2010-04-21
On HP korn shell, how can I use the time function to kick off a process at a certain time?  


thanks..  
0
Comment
Question by:vhuynh
3 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 2007626
the `time` function is not used for that.
try the `at` function
0
 
LVL 1

Expert Comment

by:arthurd
ID: 2007627
Or if you want to setup a recurring job, use cron.
0
 
LVL 5

Accepted Solution

by:
tfabian earned 100 total points
ID: 2007628
following up on the  "AT" command,

exact syntax depends on your specific OS version.. but in general,

if you type

   AT

it should allow you to enter one or more commands to execute..
control d closes the command input


 if you say something like

   AT 1030

it should continue the same, but will schedule the job at 10:30 on the next day if it's past that time, or on the same day if before...

other switches should allow naming times or days by name.  eg. today, tomorrow, Monday, etc.  


eg.    AT 1030 thursday next week shellfile

where shellfile is the shell command you want to run.. would run the job at 1030 am on the next Thursday..


I concur though, for repeat items, use a CRON job..

to edit your cron tab, enter      crontab -e

for a sample format,

30 10 * * *   /bin/shell-script-name-here

would run a script named  /bin/shell-script-name-here everyday at 10:30 am.. note that times are reversed..  minutes first, then hours, then days of the week.. etc. etc. etc. etc.  

good luck


0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now