03-19-2005
Cron
Go to a shell type in man cron
For everyone else's benefit here is the description:
cron starts a process that executes commands at specified
dates and times.
You can specify regularly scheduled commands to cron accord-
ing to instructions found in crontab files in the directory
/var/spool/cron/crontabs. Users can submit their own crontab
file using the crontab(1) command. Commands which are to be
executed only once can be submitted using the at(1) command.
cron only examines crontab or at command files during its
own process initialization phase and when the crontab or at
command is run. This reduces the overhead of checking for
new or changed files at regularly scheduled intervals.
As cron never exits, it should be executed only once. This
is done routinely by way of the svc:/system/cron:default
service. The file /etc/cron.d/FIFO file is used as a lock
file to prevent the execution of more than one instance of
cron.
cron captures the output of the job's stdout and stderr
streams, and, if it is not empty, mails the output to the
user. If the job does not produce output, no mail is sent to
the user. An exception is if the job is an at(1) job and the
-m option was specified when the job was submitted.
cron and at jobs are not executed if your account is locked.
Jobs and processses execute. The shadow(4) file defines
which accounts are not locked and will have their jobs and
processes executed.
Setting cron Jobs Across Timezones
The timezone of the cron daemon sets the system-wide
timezone for cron entries. This, in turn, is by set by
default system-wide using /etc/default/init.
If some form of daylight savings or summer/winter time is in
effect, then jobs scheduled during the switchover period
could be executed once, twice, or not at all.
Setting cron Defaults
To keep a log of all actions taken by cron, you must specify
CRONLOG=YES in the /etc/default/cron file. If you specify
CRONLOG=NO, no logging is done. Keeping the log is a user
configurable option since cron usually creates huge log
SunOS 5.10 Last change: 5 Aug 2004 1
10 More Discussions You Might Find Interesting
1. HP-UX
My max user parm is set to 1050. I'm currently at 1038 this is causing major slow downs on the server. I looking for a way log off "idle" user logins with out having to do it individually. :confused: (5 Replies)
Discussion started by: rfmurphy_6
5 Replies
2. UNIX for Dummies Questions & Answers
I have the root password for my box, but I'm ignorant.
So, every time I start my computer, I have to run this command
/sbin/modprobe fuse
as su, so that I can do other stuff (like mount remote directories locally using sshfs)
I guess there's some file, like .bashrc, only it's applicable... (4 Replies)
Discussion started by: tphyahoo
4 Replies
3. Shell Programming and Scripting
Hi there,
I wrote a script that scans a folder for new files.
I don't want to run it at specific times but only when the computer is NOT busy.
I tried to use nice but it doesn't really work. I mean, even if my process has less priority, it still slows down the other processes. I did a test... (3 Replies)
Discussion started by: chebarbudo
3 Replies
4. AIX
Dear Friends ,
I am using DB2 database in AIX 5.3 server . In my server some IDLE process are generated after several times which I need to kill it manually each and every time .
The process I query like following :
root@bagpuss $ ps auxw|sort -r +3|head -10
USER PID %CPU %MEM ... (3 Replies)
Discussion started by: shipon_97
3 Replies
5. Shell Programming and Scripting
Hi
I want to put a timer or whatever it could be ,a similar to sleep which will make the script to wait before executing it self
like
#!/bin/bash
sleep 30 #or another comand which will wait 30 s. and than proceed with code but that timer should not freeze the OS .
shell code
... (5 Replies)
Discussion started by: brain!ac
5 Replies
6. UNIX for Advanced & Expert Users
Hi Everybody,
Can anybody explain how CPU idle% is about 50%, but runq-sz more than 1?
sar from Solaris 10:
00:00:05 %usr %sys %wio %idle
17:00:08 27 12 0 61
17:20:05 40 15 0 45
17:40:05 27 12 0 61
18:00:05 23... (2 Replies)
Discussion started by: sant
2 Replies
7. Shell Programming and Scripting
Hi,
I need a script that can automatically kill all processes named "webrepn" and "webrebw" if idle for more than 30 minutes.
Then I will have a Cron Job to run the script every night or 2-3 times a day depends on how this script helps.
Right now, I run "ps -ef | grep webrebn" and "kill -9... (7 Replies)
Discussion started by: MaggieL
7 Replies
8. Windows & DOS: Issues & Discussions
I am looking to run a Windows utility BitRecover PST Viewer.
To help me read a pst file. Can anybody guide me how can I run this Windows utility on Linux. (3 Replies)
Discussion started by: marktux
3 Replies
9. Shell Programming and Scripting
I use this as a startup program.
Is there a way that it could run when my computer returns from a sleep state?
Cpu_LogFile="/home/andy/bin/CPU_Fan_Info.txt" date +"%Y-%m-%d-%H:%M:%S" >> $Cpu_LogFile sensors -f | grep "temp4" >> $Cpu_LogFile sensors -f | grep "fan1" >> $Cpu_LogFile (5 Replies)
Discussion started by: drew77
5 Replies
10. Shell Programming and Scripting
I would like to run a command if my computer is idle.
I found this, but is not quite working.
#!/bin/sh
idletime=$(xprintidle)
threshold=300000 # 5 min = 5 * 60 * 1000 ms
if ; then
echo "idle for 5 minutes."
fi (4 Replies)
Discussion started by: drew77
4 Replies