Sponsored Content
Top Forums Shell Programming and Scripting Reading a crontab 3 * * 1,3,5 /path/of/script.sh Post 302730767 by atechcorp on Tuesday 13th of November 2012 03:34:05 PM
Old 11-13-2012
This means:

0 min/ of the 3rd hour/ of every day / every hour / Monday

Am i correct ?

Quote:
Originally Posted by ctsgnb
Shouldn't it be :

Code:
0 3 * * 1 /path/script.sh

instead ?

Code:
man crontab

Code:
man cron

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Reading a path (including ref to shell variable) from file

Hi! 1. I have a parameter file containing path to log files. For this example both paths are the same, one is stated directly and the second using env variables. /oracle/admin/orcl/bdump/:atlas:trc:N ${ORACLE_BASE}/admin/${ORACLE_SID}/bdump/:${ORACLE_SID}:trc:N 2. I try to parse the path... (1 Reply)
Discussion started by: lojzev
1 Replies

2. UNIX for Dummies Questions & Answers

crontab and path

hi All, here the problem: I'm not able to specify a PATH inside the crontab file. The only syntax it accepts is the usual "* * * * * file" I'm not able to add PATH, or HOME, or MAILTO, or anything else. when I try to save the crontab, I have the error: "crontab: error on previous line;... (3 Replies)
Discussion started by: fuliggians
3 Replies

3. Shell Programming and Scripting

Maintain full path of a script in a var when sourcing it from a different script

Hi All, I've searched through the forum for a solution to this problem, but I haven't found anything. I have 2 script files that are in different directories. My first script, let's call it "/one/two/a.sh" looks like this: #!/bin/sh IN_DIR=`dirname $0` CUR_DIR=`pwd` cd $IN_DIR... (4 Replies)
Discussion started by: mrbluegreen
4 Replies

4. Shell Programming and Scripting

absolute path for a script ran with relative path

I have a script in which i want to print absolute path of the same script irrespective of path from where i run script. I am using test.sh: echo "pwd : `pwd`" echo "script name: $0" echo "dirname: `dirname $0`" when i run script from /my/test/dir/struct as ../test.sh the output i... (10 Replies)
Discussion started by: rss67
10 Replies

5. Red Hat

redhat 5.2 tikanga crond running but not reading crontab file

Issue:crond is running, can even restart it and /var/log/cron shows it starting. The /etc/crontab file is correct as compared to another machine. I set the crontab file to enter a datestamp into a file under /tmp every minute. Thing is, the crontab file is not being read or cron is not working... (12 Replies)
Discussion started by: robjmarquez
12 Replies

6. Solaris

cannot add PATH to user crontab file

hi All, here is the problem: I'm not able to specify a PATH inside the user crontab file (/var/spool/cron/crontabs). The only syntax it accepts is the usual "* * * * * file" I'm not able to add PATH, or HOME, or MAILTO, or anything else. when I try to save the crontab, I have the error: ... (1 Reply)
Discussion started by: joe_x
1 Replies

7. Shell Programming and Scripting

Script working when run manually but not in crontab showing path not found

i have a script running using variable defined in .profile when i run that script manually its working but when i run the same script through cron its giving path not found I had defined path in .profile (3 Replies)
Discussion started by: raj_saini20
3 Replies

8. Red Hat

Crontab sourcing PATH?

Hi, Im trying to run script A which requires path /sbin. I have a crontab entry to run script A every 10 minutes. Script A is executed fine by cron, but because script A requires /sbin in its path it fails to run. My situation is script A get overwritten from time to time so I can't modify... (4 Replies)
Discussion started by: wilsonee
4 Replies

9. Shell Programming and Scripting

Grep script name with path from crontab

I need help to grep file name with path from crontab ex : 0 5 * * * /tmp/test.sh 2>/tmp/test.log output : /tmp/test.sh Please use code tags next time for your code and data. Thanks (6 Replies)
Discussion started by: jhonnyrip
6 Replies

10. UNIX for Advanced & Expert Users

Command to see the logical volume path, device mapper path and its corresponding dm device path

Currently I am using this laborious command lvdisplay | awk '/LV Path/ {p=$3} /LV Name/ {n=$3} /VG Name/ {v=$3} /Block device/ {d=$3; sub(".*:", "/dev/dm-", d); printf "%s\t%s\t%s\n", p, "/dev/mapper/"v"-"n, d}' Would like to know if there is any shorter method to get this mapping of... (2 Replies)
Discussion started by: royalibrahim
2 Replies
mmsclient(1M)						  System Administration Commands					     mmsclient(1M)

NAME
mmsclient - send script commands to Media Management server SYNOPSIS
/usr/bin/mmsclient [-f filename] [-A application-name] [-c clientname] [-i instancename] [-n network_config_file] [-P password] [-p portnumber] [-s hostname:port] [-t tag] /usr/bin/mmsclient -h DESCRIPTION
The mmsclient command creates a session with a Media Management (MM) server, enabling you to send Media Management Protocol (MMP) commands to the server and receive responses from that server. When used with the -f option (see below), mmsclient runs a script file that performs MMP operations. See mmsclient_script(4) for a description of the script file. The MMP and the commands in the script file are based, in part, on IEEE 1244, the Media Management System (MMS) standards. To run mmsclient, you must become superuser, or assume the Primary Administrator role. OPTIONS
The following options are supported: -A application-name Specifies the MMS application name to use for the current session. The default application name is MMS. -c client-name Specifies the MMS client from which commands are sent to the MMS server. The default is localhost. Note that this is not the host name for the MMS, which you specify with the -s option (see below). -f filename Specifies the name of the file containing the MMP commands. See mmsclient_script(4) for a description of the script file. -h Display usage information. -i instance-name Specifies the MMS application instance to use for this session. If administrative tasks such as creating or deleting objects are planned for the session, specify the instance as Admin. -n network_config_file Defines the configuration for the application client that runs the script, including the default values. To run the script of MMP com- mands, the application client can be configured explicitly, can use the default values, or can be modified using the values in this XML file. See EXAMPLES. -P password-file Specifies the full path to a file containing the password for the application specified with the -A option. If the command does not contain the -P option, you are prompted for the password. There is no default. -p portnumber Specify port number of MMS server. -s hostname[:port] Specifies the MMS server and, optionally, the port number, to which you send MMP commands. If you do not specify port, the port number defaults to 7151. -t tag Specify a tag for identifying an MMS session. You can match against tag to query information related to a session. The default tag is mmsclient-pid=pid, where pid is the PID of the MMS client. EXAMPLES
Example 1 Example of a Network Configuration File The following example configuration file, net_cfg.xml, specifies the conditions under which the MMP commands are performed: <!-- Client Configuration --> <mms_cfg> <!-- Network Configuration --> <mms_network_cfg host = "localhost" port = "7151" name = "MMS" instance = "admin" language = "MMP" version = "1.0" password = "summer05" <!-- mm_password = "MMS Media Manager" --> ssl_enabled = "false" ssl_cert_file = "/var/mms/ssl/pub/mms.pem" ssl_pass_file = "/var/mms/ssl/pub/mms_pass" <!-- ssl_crl_file = "/var/mms/ssl/pub/mms_crl.pem" --> /> </mms_cfg> Example 2 Running a Script with Default Connections The following command runs a script named test_beginend with the default connections: # mmsclient -f test_beginend Example 3 Specifying a Client by Host Name and Port Number The following command runs a script named test_beginend that connects to an MMS server on a host named x4200 and port number 1492 as the HSM admin: # mmsclient -f test_beginend -A HSM -i admin -t HSM_test_session -s x4200:1492 Example 4 Using a Network Configuration File and Specifying an Interactive Session The following command connects to the MMS server defined in the net_cfg.xml file and runs an interactive session: # mmsclient -n net_cfg.xml EXIT STATUS
0 Success. !=0 An error occurred. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWmmsu | +-----------------------------+-----------------------------+ |Interface Stability |Volatile | +-----------------------------+-----------------------------+ SEE ALSO
mmsadm(1M), mmsexplorer(1M), mmsinit(1M), mmsclient_script(4), attributes(5) IEEE 1244, IEEE Storage Systems Standards, a set of MMS standards SunOS 5.11 2 Dec 2008 mmsclient(1M)
All times are GMT -4. The time now is 08:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy