Cron entry


 
Thread Tools Search this Thread
Operating Systems AIX Cron entry
# 1  
Old 10-21-2005
Cron entry

Hi All,

I want to run a cron job to run on the first saturday of each month at 1:30am. Would the following entry suffice this condition

30 1 6 * 6 wall %Will this work%

Appreciate your time.
# 2  
Old 11-01-2005
Might depend on your environment (OS). Here is the man page for crontab in Linux:

Code:
www# man crontab
CRONTAB(1)                                             CRONTAB(1)

NAME
       crontab - manipulate per-user crontabs (Dillon's Cron)

SYNOPSIS
       crontab file [-u user] - replace crontab from file

       crontab - [-u user] - replace crontab from stdin

       crontab -l [user] - list crontab for user

       crontab -e [user] - edit crontab for user

       crontab -d [user] - delete crontab for user

       crontab -c dir - specify crontab directory

DESCRIPTION
       crontab manipulates the crontab for a particular user.  Only the superuser may specify
       a different user and/or crontab directory.  Generally the -e option is  used  to  edit
       your  crontab.   crontab  will  use /usr/bin/vi or the editor specified by your VISUAL
       environment variable to edit the crontab.

       Unlike other crond/crontabs, this crontab does not try to do everything under the sun.
       Frankly,  a shell script is much more able to manipulate the environment then cron and
       I see no particular reason to use the user's shell (from his password  entry)  to  run
       cron  commands  when  this requires special casing of non-user crontabs, such as those
       for UUCP.  When a crontab command is run, this crontab runs it with /bin/sh  and  sets
       up only three environment variables: USER, HOME, and SHELL.

       crond  automatically  detects  changes in the time.  Reverse-indexed time changes less
       then an hour old will NOT re-run crontab commands  already  issued  in  the  recovered
       period.  Forward-indexed  changes  less then an hour into the future will issue missed
       commands exactly once.  Changes greater then an hour into the  past  or  future  cause
       crond  to  resynchronize  and  not  issue missed commands.  No attempt will be made to
       issue commands lost due to a reboot, and commands are not reissued if  the  previously
       issued  command  is  still running.  For example, if you have a crontab command 'sleep
       70' that you wish to run once a minute, cron will only be able to  issue  the  command
       once every two minutes.  If you do not like this feature, you can run your commands in
       the background with an '&'.

       The crontab format is roughly similar to that used by vixiecron, but  without  complex
       features.   Individual  fields  may  contain a time, a time range, a time range with a
       skip factor, a symbolic range for the day of week and month in  year,  and  additional
       subranges  delimited with commas.  Blank lines in the crontab or lines that begin with
       a hash (#) are ignored.  If you specify both a day in the month and a day of week, the
       result  is  effectively  ORd...  the crontab entry will be run on the specified day of
       week and on the specified day in the month.

       # MIN HOUR DAY MONTH DAYOFWEEK   COMMAND
       # at 6:10 a.m. every day
       10 6 * * * date

       # every two hours at the top of the hour
       0 */2 * * * date

       # every two hours from 11p.m. to 7a.m., and at 8a.m.
       0 23-7/2,8 * * * date

       # at 11:00 a.m. on the 4th and on every mon, tue, wed
       0 11 4 * mon-wed date

       # 4:00 a.m. on january 1st
       0 4 1 jan * date

       # once an hour, all output appended to log file
       0 4 1 jan * date >>/var/log/messages 2>&1

       The command portion of the line is run with /bin/sh -c  <command>  and  may  therefore
       contain any valid bourne shell command.  A common practice is to run your command with
       exec to keep the process table uncluttered.  It is also common to redirect output to a
       log  file.   If  you do not, and the command generates output on stdout or stderr, the
       result will be mailed to the user in question.  If you use this mechanism for  special
       users,  such  as UUCP, you may want to create an alias for the user to direct the mail
       to someone else, such as root or postmaster.

       Internally, this cron uses a quick indexing system to reduce CPU overhead when looking
       for  commands  to execute.  Several hundred crontabs with several thousand entries can
       be handled without using noticable CPU resources.

BUGS
       Ought to be able to have several crontab files for any given  user,  as  an  organiza-
       tional tool.

AUTHOR
       Matthew Dillon (dillon@apollo.west.oic.com)

Maybe try:

Code:
# MIN HOUR DAY MONTH DAYOFWEEK   COMMAND
# at 1:30 a.m. between the 1st and 7th day of the month on Sat.
       
30 1 1-7 * sat your_command

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Cron entry

Hi I have a system running solaris 11, in which I am able to execute a script from the command line, but once I put i the crontab does run, but do not give results. The entry is: 15 11 * * * /var/oswbb/./startOSWbb.sh >> myjob.log 2>&1 30 11 * * * /var/oswbb/./stopOSWbb.sh I have check... (2 Replies)
Discussion started by: fretagi
2 Replies

2. Solaris

Cron entry not running

Hi I have one entry in my crontab that do not run, in cron, but it runs manually: 53 7 * * * /moneta_polled01/download/./get_dealer.sh 55 7 * * * /moneta_polled01/download/./mov_dealer.sh The first entry do not run automatically, but it runs manually. The second entry runs... (12 Replies)
Discussion started by: fretagi
12 Replies

3. Shell Programming and Scripting

Cron JOb Entry

Hi All, i have a folder in a server say xxx.xx.xx.xx\abcd\efgh. i want to make a cron job entry so that i would get a mail (me@example.com) on business days. will this help me... 30 4 * * 1-5 cd \abcd\efgh|ls-ltr|mailx:me@example.comhttps://www.unix.com/images/editor/code.png (10 Replies)
Discussion started by: mahesh300182
10 Replies

4. Solaris

cron entry

Hi, I have to add two cron entry now. Please correct me if anything wrong Below script should run at every one and half hour. 30 01 * * * /export/home/gxadm/scripts/collect_mq_info.pl $HOME/GCSS/logs > /dev/null 2>&1 Below script should run at every 2 hours 0 02 * * *... (9 Replies)
Discussion started by: Mani_apr08
9 Replies

5. UNIX for Advanced & Expert Users

cron entry

Hi, I need some clarification on cron entries. I have a cron job like.. 15 01 19 02 6 exec /usr/bin/test.ksh and I have another cron entry added, which is 15 01 20 02 6 exec /usr/bin/test.ksh So, I am thinking the second cron entry shouldn't have run because 02/20 is Sunday, but... (1 Reply)
Discussion started by: everurs789
1 Replies

6. UNIX for Dummies Questions & Answers

cron entry

Can someone please quickly respond to this? I need to have a script test.sh to run every 30 minutes from Monday to Saturday from 6am to 10pm as a crontab entry... Thanks. (3 Replies)
Discussion started by: everurs789
3 Replies

7. Solaris

User entry in both cron.allow and cron.deny

Hello All, Anybody please help me to know ,what happens when a user having entry in both cron.allow and cron.deny files.Wheather the user will be able to access the crontab??? Thanks in advance Vaisakh (5 Replies)
Discussion started by: ksvaisakh
5 Replies

8. Shell Programming and Scripting

not able to locate the cron entry

Hi, I am new to unix. I have once made an entry into cron file for one scirpt to run. The script sends me email. But i want the script entry removed from the cron file. But i am not able to find the entry in cron file. When i do crontab -e it shows content of the file but my script is... (3 Replies)
Discussion started by: ajincoep
3 Replies

9. Shell Programming and Scripting

Cron Entry

Hi folks, I have got the following cron entry ... 08 30 * * * /mp1/scripts/test.sh > /mp1/scripts/test_logs.txt 2>&1 The problem is that instead of generating a new test_logs.txt file every time it keeps on appending the outputs to the test_logs.txt file. What is it that I am doing wrong... (2 Replies)
Discussion started by: King Nothing
2 Replies

10. UNIX for Dummies Questions & Answers

cron entry

Hi, Where can we find Cron job logs?i have a cron job which is not executing at all, 00 12 * * * /xx/yy/job > /pp/qq/log if i execute the job alone,it is executing fine. >/xx/yy/job > /pp/qq/log (is executing fine) but its not executing when it triggered from cron.is there any place cron... (7 Replies)
Discussion started by: rujus
7 Replies
Login or Register to Ask a Question