8 More Discussions You Might Find Interesting
1. Emergency UNIX and Linux Support
If an email is sent from our application server(running on AIX) to an id that is outside of the organization like gmail etc, and if gmail should not treat the mail as spam, what has to be done from unix level? (7 Replies)
Discussion started by: ggayathri
7 Replies
2. Shell Programming and Scripting
Guys, is there a script or command?
how to disable cron emails, but only for logrotate only not for other logs (3 Replies)
Discussion started by: kenshinhimura
3 Replies
3. Shell Programming and Scripting
I have a cron entry to deploy a website portal from a staging server to a series of production servers on a weekly basis.
On occasion, a random office worker who knows nothing about Linux let alone cron, will be tasked to update news picks on the staging server and then run a manual deployment... (2 Replies)
Discussion started by: AndrewT
2 Replies
4. Shell Programming and Scripting
We use Solaris 10 x86 and I want to use a cron job to remove directories +90 old. Currently I have the command below but it only cleans the files and keeps the directory. What am I doing wrong?
/opt/tesk/batch/kit/archive/* -mtime +90 -exec rm -r {} \:
Thank you (3 Replies)
Discussion started by: oh-daa
3 Replies
5. UNIX for Dummies Questions & Answers
I would like to know if I can place a cron job (and what it might be of course) to delete all the mail in an inbox? Here are the servers specs:
Operating systemLinuxService StatusClick to ViewKernel version2.6.28.9Machine Typei686Apache version2.2.11 (Unix)PERL version5.8.8Path to... (2 Replies)
Discussion started by: markmatu
2 Replies
6. UNIX for Dummies Questions & Answers
Hi everyone! I'm sorry, I'm a total noob but would really appreciate any advice or help. I want to create a cron job that would run every hour and would look inside a few different folders. If any new files were created within those folders within the last hour they would be destroyed, but any... (2 Replies)
Discussion started by: jessn
2 Replies
7. UNIX for Dummies Questions & Answers
I'd like to delete ALL files on a daily basis within a directory that are over a day old. Anyone know how I can automate this through Cron as I have 146 websites to administer.
I've tried...
30 02 * * * /home/myspace/tmp/webalizer -atime + 1\! -type d -exec rm -f {} \;
but all i get is an... (1 Reply)
Discussion started by: southoxon
1 Replies
8. UNIX for Dummies Questions & Answers
Please advise on how to delete spam email from mmdf email, and
The Unix spec below:
System = SCO_SV
Release = 3.2v5.0.5 (2 Replies)
Discussion started by: esh
2 Replies
CRON(8) BSD System Manager's Manual CRON(8)
NAME
cron -- daemon to execute scheduled commands (ISC Cron V4.1)
SYNOPSIS
cron [-n] [-x debugflags]
DESCRIPTION
cron is normally started during system boot by rc.d(8) framework, if cron is switched on in rc.conf(5).
It will return immediately so you don't have to start it with '&'.
cron searches /var/cron/tabs for crontab files which are named after accounts in /etc/passwd. Crontabs found are loaded into memory. cron
also searches for /etc/crontab which is in a different format (see crontab(5)). Finally cron looks for crontabs in /etc/cron.d if it exists,
and executes each file as a crontab.
When cron looks in a directory for crontabs (either in /var/cron/tabs or /etc/cron.d) it will not process files that:
- Start with a '.' or a '#'.
- End with a '~' or with ``.rpmsave'', ``.rpmorig'', or ``.rpmnew''.
- Are of zero length.
- Their length is greater than MAXNAMLEN.
cron then wakes up every minute, examining all stored crontabs, checking each command to see if it should be run in the current minute. When
executing commands, any output is mailed to the owner of the crontab (or to the user named in the MAILTO environment variable in the crontab,
if such exists).
Events such as START and FINISH are recorded in the /var/log/cron log file with date and time details. This information is useful for a num-
ber of reasons, such as determining the amount of time required to run a particular job. By default, root has an hourly job that rotates
these log files with compression to preserve disk space.
Additionally, cron checks each minute to see if its spool directory's modtime (or the modtime on /etc/crontab or /etc/cron.d) has changed,
and if it has, cron will then examine the modtime on all crontabs and reload those which have changed. Thus cron need not be restarted when-
ever a crontab file is modified. Note that the crontab(1) command updates the modtime of the spool directory whenever it changes a crontab.
The following options are available:
-x This flag turns on some debugging flags. debugflags is comma-separated list of debugging flags to turn on. If a flag is turned on,
cron writes some additional debugging information to system log during its work. Available debugging flags are:
sch scheduling
proc process control
pars parsing
load database loading
misc miscellaneous
test test mode - do not actually execute any commands
bit show how various bits are set (long)
ext print extended debugging information
-n Stay in the foreground and don't daemonize cron.
Daylight Saving Time and other time changes
Local time changes of less than three hours, such as those caused by the start or end of Daylight Saving Time, are handled specially. This
only applies to jobs that run at a specific time and jobs that are run with a granularity greater than one hour. Jobs that run more fre-
quently are scheduled normally.
If time has moved forward, those jobs that would have run in the interval that has been skipped will be run immediately. Conversely, if time
has moved backward, care is taken to avoid running jobs twice.
Time changes of more than 3 hours are considered to be corrections to the clock or timezone, and the new time is used immediately.
SIGNALS
On receipt of a SIGHUP, the cron daemon will close and reopen its log file. This is useful in scripts which rotate and age log files. Natu-
rally this is not relevant if cron was built to use syslog(3).
FILES
/var/cron/tabs cron spool directory
/etc/crontab system crontab file
/etc/cron.d/ system crontab directory
/var/log/cron log file for cron events
SEE ALSO
crontab(1), crontab(5)
AUTHORS
Paul Vixie <vixie@isc.org>
BSD
October 12, 2011 BSD