![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| To call/execute a shell script from a shell script | konark | UNIX for Dummies Questions & Answers | 1 | 10-26-2007 05:16 PM |
| i want a script to execute if the time is 12:00 automatically | lakshmananindia | UNIX for Advanced & Expert Users | 2 | 09-04-2007 04:22 PM |
| Execute Shell Script | sam71 | UNIX for Dummies Questions & Answers | 1 | 04-29-2005 01:43 PM |
| Is it possible to execute shell script with PHP? | Micz | Shell Programming and Scripting | 1 | 05-27-2004 11:52 AM |
| How to execute shell Script? | siva | Shell Programming and Scripting | 3 | 05-14-2002 11:07 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
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 /etc/secondimp.conf ##------ End of test.sh ------ ## So .. how do I achieve this.. a cron is set to run test.sh daily... but I want commands from line 4 to run only after 15 July 2007 11:23 pm ... if not.. the script will execute first two commands only and exit. Please advise. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|