Sponsored Content
Top Forums Shell Programming and Scripting Running a Cron Script only @ Startup Pls Help!! Post 302127285 by srikanthus2002 on Tuesday 17th of July 2007 05:47:49 AM
Old 07-17-2007
uname -a
server server 4.0 3.0 3516 Pentium IV(TM)-ISA/PCI

I am using NCR UNIX

Go to "/etc/rc2.d " direcotry and create a file as "S11file_name"

file name should be started with "S and two numbers"

rename your script as S11file_name
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Running script using cron

I am running a script by scheduling it using the cron. The line in the cron file is - 10 * * * * ksh -v /apps/gofis/svam/cos_automation/cos_automation.sh vpqa > /apps/gofis/svam/cos_automation/cron.log 2>&1 But after the job is executed, the cron.log contains some part from... (4 Replies)
Discussion started by: ankurgupta
4 Replies

2. UNIX for Dummies Questions & Answers

Running a script in cron question

There is this script I'd like to put into cron, but it asks for date verification. It'll prompt you to press enter to continue. Usually, 100% of the time the dates are ok, so is there a way to run this script in cron and bypass the "enter" prompt? (3 Replies)
Discussion started by: NycUnxer
3 Replies

3. Shell Programming and Scripting

Running a script with cron

I have the following script (trapsize) that checks a file size on my syslog server, and if the file is gt 6g, it will mail an alert to the admin for inspection. The following works like a champ when I execute ./trapsize logged in as root user using bash shell. FILESIZE=$(ls -l /opt2/fwsm/fwsm... (3 Replies)
Discussion started by: altamaha
3 Replies

4. Shell Programming and Scripting

ftp script is not running from CRON

Hi I have an FTP script, which ftp's the files from one unix box to another box. It works from the command when I Issue > ksh ftp.ksh when I schedule it in CRON, it is not being executed automatically. Any thoughts please Thanks Ravi. (4 Replies)
Discussion started by: ravi.balley
4 Replies

5. Solaris

Script not running from cron

Hi, I''ve made a script that's running fine from the command line but when running from cron it encounters the following issue: /tmp/tstscript/testfail.ksh: typeset: not found I've searched in Google and couldn't find anything, here's the beggining of the script (I can post the rest if... (4 Replies)
Discussion started by: Cvg
4 Replies

6. Red Hat

running my own script during startup

Hi, I am using scientific linux with is a red hat cloning. I have written a script and I want it to be run during startup before the user log in. How do I do that? I know that there is some connection to the run level and the directory /etc/rc.d. But I don't know how exactly to do it ?... (4 Replies)
Discussion started by: programAngel
4 Replies

7. Shell Programming and Scripting

Script running using cron

Hello All, I am running the below script.when i am running from shell or terminal its running fine but running using cron its not working. ################################ b36376 27 % cat make_nis_account_ankit.sh #!/bin/ksh ... (2 Replies)
Discussion started by: ajaincv
2 Replies

8. Shell Programming and Scripting

Running shell script via cron

Hi Guys, I do have a shell script that I scheduled to run via the cron but when the script don't run. But when I run the script manually it does run perfectly... What might be the problem? Thanks. (1 Reply)
Discussion started by: Phuti
1 Replies

9. Shell Programming and Scripting

Script not running in cron

Hi All, I have a script which is running fine while triggered manually, However if I placed in crontab it throwing an error. #!/usr/bin/ksh set -vx lc=1 st_date=$(`date "+%Y%m%d"`) LOGFILE=/home/transfer.log.$st_date file="/home/OM_WF.log.$st_date" Manual run - lc=1 + lc=1... (4 Replies)
Discussion started by: nag_sathi
4 Replies

10. UNIX for Advanced & Expert Users

Script not running at startup

I am having check.sh script and check.service which I include to /etc/systemd/system/ chmod 744 /usr/local/bin/check.sh chmod 664 /etc/systemd/system/check.service systemctl daemon-reload systemctl enable check.servicecheck.sh: websockify 5555 localhost:7000 & date >... (9 Replies)
Discussion started by: tomislav91
9 Replies
ypxfr(1M)						  System Administration Commands						 ypxfr(1M)

NAME
ypxfr, ypxfr_1perday, ypxfr_1perhour, ypxfr_2perday - transfer NIS map from a NIS server to host SYNOPSIS
/usr/lib/netsvc/yp/ypxfr [-c] [-f] [ -C tid prog server] [-d ypdomain] [-h host] [-s ypdomain] mapname DESCRIPTION
The ypxfr command moves an NIS map in the default domain for the local host to the local host by making use of normal NIS services. It creates a temporary map in the directory /var/yp/ypdomain (this directory must already exist; ypdomain is the default domain for the local host), fills it by enumerating the map's entries, fetches the map parameters (master and order number), and loads them. It then deletes any old versions of the map and moves the temporary map to the real name. If run interactively, ypxfr writes its output to the terminal. However, if it is started without a controlling terminal, and if the log file /var/yp/ypxfr.log exists, it appends all its output to that file. Since ypxfr is most often run from the privileged user's crontab file, or by ypserv, the log file can retain a record of what was attempted, and what the results were. For consistency between servers, ypxfr should be run periodically for every map in the NIS data base. Different maps change at different rates: a map might not change for months at a time, for instance, and can therefore be checked only once a day. Some maps might change sev- eral times per day. In such a case, you might want to check hourly for updates. A crontab(1) entry can be used to automatically perform periodic updates. Rather than having a separate crontab entry for each map, you can group commands to update several maps in a shell script. Examples (mnemonically named) are in /usr/sbin/yp: ypxfr_1perday, ypxfr_2perday, and ypxfr_1perhour. Refer to ypfiles(4) for an overview of the NIS name service. OPTIONS
-c Do not send a "Clear current map" request to the local ypserv process. Use this flag if ypserv is not running locally at the time you are running ypxfr. Otherwise, ypxfr complains that it cannot communicate with the local ypserv, and the transfer fails. -f Force the transfer to occur even if the version at the master is not more recent than the local version. -C tid prog server This option is for use only by ypserv. When ypserv starts ypxfr, it specifies that ypxfr should call back a yppush process at the host server, registered as program number prog, and waiting for a response to transaction tid. -d ypdomain Specify a domain other than the default domain. -h host Get the map from host, regardless of the master. If host is not specified, ypxfr asks the NIS service for the name of the master, and tries to get the map from there. host must be a valid host name. -s ypdomain Specify a source domain from which to transfer a map that should be the same across domains. FILES
/var/yp/ypxfr.log Log file /usr/lib/netsvc/yp/ypxfr_1perday Script to run one transfer per day, for use with cron(1M) /usr/lib/netsvc/yp/ypxfr_2perday Script to run two transfer per day, for use with cron(1M) /usr/lib/netsvc/yp/ypxfr_1perhour Script for hourly transfers of volatile maps /var/yp/ypdomain NIS domain /usr/spool/cron/crontabs/root Privileged user's crontab file ATTRIBUTES
See attributes(5) for descriptions of the following attributes: ypxfr Only +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWnisu | +-----------------------------+-----------------------------+ ypxfr_1perday, ypxfr_1perhour, and ypxfr_2perday +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWypu | +-----------------------------+-----------------------------+ SEE ALSO
crontab(1), cron(1M), ypinit(1M), yppush(1M), ypserv(1M), ypfiles(4), attributes(5) SunOS 5.10 11 Mar 1998 ypxfr(1M)
All times are GMT -4. The time now is 01:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy