Please can someone help me. I need to set up a cron job to measure CPU usage, Disk I/O and memory usage over a period of 1 minute along with the number of users logged into the system. I also need to send it to another user besides myself every hour. Please can someone help me! Thanks. (4 Replies)
Dear Guru,
I have submitted some cronjobs that has been running for quite sometimes. However, today I counter some cronjob did not run. Can you please explain what causes this to happen. Any system setting that limit number of cronjob per minutes to be started, etc?
Thanks.
Kelly (1 Reply)
hi
iam new at unix.iam running a cronjob,which i want to run on the first day of every month at 1AM.this is what i have specified:
00 01 1 * *
is this corect? (1 Reply)
Hi,
I'm totally new to shell scripting. I need help in my crontab script. I'm trying to read some values from user (username, log file directory, server) and then use those value to create a crontab for log rotation after some interval of time.
creating crontabs manually isn't big deal.... (11 Replies)
Hi,
I want to schedule a script on daily basis in morning 8:00 A.M and 5:00 P.M , how can i achieve this, i want the parameter
0 ? * * *
what will be the second parameter in my case.
Regards (1 Reply)
hi everyone I'm newbie in this forum hope I can get some help here :)
I have a command in crontab that executed every 1 minute
sometime this command need more than 1 minute to finish
the problem is, the crontab execute this command although it's not finish processing yet and causing the system... (7 Replies)
Hi I am very new to linux. I want to run a cronjob every 15 minutes that checks a directory for files. If the directory contains more than ten files I want it to send an email to me.
All I have is this...
*/15 * * * * ls -l | wc -l | | mail -s "This is just a test"
I would... (2 Replies)
I have a script named email_kill.sh which kills the EMAIlL engine process. See the below content:
#! /usr/bin/ksh -x
PID=`ps -eaf | grep "AREmail" | tail -1 | awk '{print $2}'`
echo "$PID"
kill -9 "$PID"
For this script to execute every hour I made a cronjob:
0... (2 Replies)
Is the cronjob below can run only first wednesday of every month?
30 5 1-7 * 3 command
please tell me (3 Replies)
Discussion started by: Anjan1
3 Replies
LEARN ABOUT SUNOS
rmdirp
mkdirp(3GEN) String Pattern-Matching Library Functions mkdirp(3GEN)NAME
mkdirp, rmdirp - create or remove directories in a path
SYNOPSIS
cc [ flag ... ] file ... -lgen [ library ... ]
#include <libgen.h>
int mkdirp(const char *path, mode_t mode);
int rmdirp(char *dir, char *dir1);
DESCRIPTION
The mkdirp() function creates all the missing directories in path with mode. See chmod(2) for the values of mode.
The rmdirp() function removes directories in path dir. This removal begins at the end of the path and moves backward toward the root as far
as possible. If an error occurs, the remaining path is stored in dir1.
RETURN VALUES
If path already exists or if a needed directory cannot be created, mkdirp() returns -1 and sets errno to one of the error values listed for
mkdir(2). It returns zero if all the directories are created.
The rmdirp() function returns 0 if it is able to remove every directory in the path. It returns -2 if a ``.'' or ``..'' is in the path and
-3 if an attempt is made to remove the current directory. Otherwise it returns -1.
EXAMPLES
Example 1: Example of creating scratch directories.
The following example creates scratch directories.
/* create scratch directories */
if(mkdirp("/tmp/sub1/sub2/sub3", 0755) == -1) {
fprintf(stderr, "cannot create directory");
exit(1);
}
chdir("/tmp/sub1/sub2/sub3");
.
.
.
/* cleanup */
chdir("/tmp");
rmdirp("sub1/sub2/sub3");
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO chmod(2), mkdir(2), rmdir(2), malloc(3C), attributes(5)NOTES
The mkdirp() function uses malloc(3C) to allocate temporary space for the string.
SunOS 5.10 14 Oct 2003 mkdirp(3GEN)