How to execute a part of code at particular time


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to execute a part of code at particular time
# 1  
Old 09-03-2012
How to execute a part of code at particular time

I had to execute the following code at 10:00 AM
Code:
if [ -z $ "k" ]
then
  echo "Job done";
fi

But this is not the entire piece of code, this is sub part of code which alone is to be executed at 10:00 AM, could anyone help me with this?

Last edited by Franklin52; 09-03-2012 at 05:46 AM.. Reason: Please use code tags for data and code samples
# 2  
Old 09-03-2012
use cron for this
This User Gave Thanks to raj_saini20 For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need to execute a script by one user at a time

Hi , I have a script which everyone have access but I need that the script should be ran by one user at a time. The second user who is trying to execute the script should get a message stating that the user is already executing the script. Is there any way to achieve this.? Thanks in advance. (2 Replies)
Discussion started by: rogerben
2 Replies

2. UNIX for Advanced & Expert Users

command taking lot of time to execute

Hi, I am running the following command, and it tries to delete some dn from ldap, however, it takes lot of time before it finally request LDAP server to delete it. I am trying to find why it is taking lot of time. Could you anyone help me in this regard. I have copies the pstack output, and... (3 Replies)
Discussion started by: john_prince
3 Replies

3. Shell Programming and Scripting

Hex to decimal - Execute command for the matching part

Alo I have this input: 0x10=some text 0x20=some text 0x30=some text and want this output: 16=some text 32=some text 48=some text I want to use a command to convert from hex to decimal i.e.: $ echo $((0x15a)) or $ printf '%d\n' 0x15a I try to use something like this: sed... (5 Replies)
Discussion started by: chitech
5 Replies

4. Shell Programming and Scripting

Execute 2 Commands at the same time

Hi @all I have got the following problem: I want my Master-Script to execute 2 Sub-scripts at the same time. How can i realize that? Thx for your help Greez Roger (2 Replies)
Discussion started by: DarkSwiss
2 Replies

5. Programming

Time Taken to execute a command

How can we find the time taken by a comman to execute say cp a b what is the time taken by this command (2 Replies)
Discussion started by: abhisheklodha13
2 Replies

6. Shell Programming and Scripting

Time taken to execute a ksh

Hi, I am executing a ksh. I want to note the time taken to execute each command that are executed in the ksh and write it in a log file. Also I want to note the total time taken to execute the ksh. How can I do that?What is the command to do that? (2 Replies)
Discussion started by: Kishore_1
2 Replies

7. Shell Programming and Scripting

Time Command - Part 2

I am trying to collect some scripts performance. I wrote: #!/usr/local/bin/bash echo Locked Objects time /webaplic/monitor_exp_funcional.sh NUM_LOCKED_OBJ echo Users On time /webaplic/monitor_exp_funcional.sh USERS_ON Then I call "test.sh > Results.out" Obviously, the time command... (4 Replies)
Discussion started by: bdalmeida
4 Replies

8. Solaris

how to execute java in specified time- urgent

Hi, 1. I want to execute a set of java files(a small appln) at specified time interval in solaris. that java uses documentum DFC calls. 2. How can i do this? from thread i chked ppl suggest to do cron, and so.. pls provide me a details steps hence i am new to solaris.. Any... (1 Reply)
Discussion started by: radhnki
1 Replies

9. UNIX for Advanced & Expert Users

i want a script to execute if the time is 12:00 automatically

i write a script for displaying a xmessage.But i want it to run automatically for every one hour.can any one help me. (2 Replies)
Discussion started by: lakshmananindia
2 Replies

10. Shell Programming and Scripting

Execute a part of shell script only after particular date and time

I have created a simple shell script... say test.sh Contents of test.sh ================ service named restart cp /etc/imp.conf /backup/test/ #-- if date > 15 July 2007 11:23 pm , then only issue the commans below, else exit --- cp /etc/secondimp.conf /backup/test/ rm -f... (2 Replies)
Discussion started by: fed.linuxgossip
2 Replies
Login or Register to Ask a Question