The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 07-04-2009
mrpranab mrpranab is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 4
runtime crontab entry

Hi,

I have a query. When I execute a shell script say sh1.ksh,
at the run time I need to put another shell script say sh2.ksh
in the crontab with the parameter which we provided to sh1.ksh
script, to execute sh2.ksh on the background for doing process.

Also the cron entry needs to be removed after the script
finishes its jobs.

How do we put a file in the crontab with parameter and remove
the entry from crontab dynamically?

Ex: - ./sh1.ksh <parameter1-name> <parameter2-name>

In crontab the script should look like this:
5 * * * * sh2.ksh <parameter1-name> <parameter2-name>

Thanks in adv.