Sponsored Content
Full Discussion: Crontab jobs excuting
Top Forums UNIX for Dummies Questions & Answers Crontab jobs excuting Post 302957193 by Don Cragun on Thursday 8th of October 2015 04:35:46 AM
Old 10-08-2015
So, according to the man page, the last field before the command to be executed specifies the days when the job is to be run. As in:
Code:
0,5,10,15,20,25,30 11 * * 1-5 my-command
0,5,10,15,20,25,30,35,40,45,50,55 7-10 * * 1-5 my-command

This User Gave Thanks to Don Cragun For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Overlapping(executing time) jobs in crontab

I do not have the luxery of a server that i can try on, so i had to post my qn here. Say i have two jobs in the cron table, the jobs are scheduled 2 mins apart. Assuming the first jobs does a lot of operations and takes > 2 mins. Will the second job be executed? Will Unix actually have a queue... (3 Replies)
Discussion started by: new2ss
3 Replies

2. UNIX for Advanced & Expert Users

Crontab did not fire jobs

Hello, I have something weird that I need some solution and hope that you can help out there :). I have crontab entry and it is running everyday. Sometimes, the crontab will just hang/stale where my jobs will not be executed(of course, the user complaint, then only I know). I will need to do:... (4 Replies)
Discussion started by: hwh1
4 Replies

3. Shell Programming and Scripting

background jobs exit status and limit the number of jobs to run

i need to execute 5 jobs at a time in background and need to get the exit status of all the jobs i wrote small script below , i'm not sure this is right way to do it.any ideas please help. $cat run_job.ksh #!/usr/bin/ksh #################################### typeset -u SCHEMA_NAME=$1 ... (1 Reply)
Discussion started by: GrepMe
1 Replies

4. Shell Programming and Scripting

crontab jobs to append to the same log

Hi, all: I have a shell script runs in the crontab, which writes the output to a log file, as following: 0 18 * * * /oracle/deleteBackup.sh >/oracle/deleteBackup.log Everytime the script is run by crontab , the deleteBackup.log is overwritten, is there anyway that I can append to the... (2 Replies)
Discussion started by: ericaworld
2 Replies

5. UNIX for Dummies Questions & Answers

Re : Set multiple cron jobs in one crontab file

Hello All, Hopw all is fine. I am newbie to Unix. I am using Bourne Shell (sh). One of the question I have is that I am trying to read XML file and based on reading that XML file I want to run different java programs at different hours. Meaning 05 14 * * * java ./program1 10 14 * * * java... (3 Replies)
Discussion started by: samshaw
3 Replies

6. AIX

crontab isn't excuting some commands

Greetings everybody, I have an IBM P520 AIX 5.3 server machine and trying to use crontab to periodically excute a script that contains a command belongs to my software (Fast/Tools SCADA software) I added the following line after using crontab -e 01 * * * * /mypath/myscript I have two... (3 Replies)
Discussion started by: ayman metwally
3 Replies

7. Shell Programming and Scripting

Crontab jobs don't see variables defined in /etc/profile

Is it true that Crontab jobs don't see variables defined in /etc/profile? How to get around that? (4 Replies)
Discussion started by: proactiveaditya
4 Replies

8. UNIX for Dummies Questions & Answers

How to start jobs manually from Crontab

Hello - I have about 7 jobs listed in my crontab. They run automatically everyday. However I am wondering how to start them manually? My system is SunOS 5.10 Jobs are listed in this fashion: 41 00 * * 1-5 /system/volms/.vbc/startmeup 01 44 * * 0-6 /system/volms/.vbc/kill (space)... (7 Replies)
Discussion started by: DallasT
7 Replies

9. Shell Programming and Scripting

waiting on jobs in bash, allowing limited parallel jobs at one time, and then for all to finish

Hello, I am running GNU bash, version 3.2.39(1)-release (x86_64-pc-linux-gnu). I have a specific question pertaining to waiting on jobs run in sub-shells, based on the max number of parallel processes I want to allow, and then wait... (1 Reply)
Discussion started by: srao
1 Replies

10. Shell Programming and Scripting

Crontab jobs log

hi gurus, I have scheduled some script by using crontab. I would like to save all the logs in some particular directory whenever the jobs are running. please let me know how i need to code it to save the logs files. (2 Replies)
Discussion started by: arun888
2 Replies
at(1)							      General Commands Manual							     at(1)

Name
       at, batch - execute commands at a later time

Syntax
       at time [day] [file]
       at -r job...
       at -l [job...]

       batch [file]

Description
       The  and commands use a copy of the named file (standard input default) as input to or at a later time.	A command to the current directory
       is inserted at the beginning, followed by assignments to all environment variables.  When the script is run, it uses the user and group	ID
       of the creator of the copy file.

       The command allows the user to specify when the commands should be executed, while jobs queued with execute when the load level of the sys-
       tem permits.

       The environment variables, current directory, and are retained when the commands are executed.  However, open files,  traps,  and  priority
       are lost.

       Users are permitted to use the and commands if their name appears in the file If that file does not exist, the file is checked to determine
       if the user should be denied access to and If neither file exists, only the superuser is allowed to submit a job.  If only the file  exists
       and is empty, global usage is permitted.  The files consist of one user name per line.

       The  time  is  1  to 4 digits.  It can, but does not have to be, followed by A, P, N or M which stand for AM, PM, noon or midnight, respec-
       tively. The A, P, N, and M suffixes are case-insensitive.  One and two digit numbers are interpreted as hours, three and four digits to	be
       hours  and  minutes. If three digits are specified, the first digit is interpreted to be an hour in the range 0-9, and the second and third
       digits as minutes.  If no letters follow the digits, a 24 hour clock time is presumed.

       In addition to 1-4 digits, and suffixes A, P, M, N, you can also specify:
       at hh:mm
       at h:mm
       at ham
       at hpm
       at noon
       at midnight

       The optional day is either a month name followed by a day number or by a day of the week.  If the word week  follows,  the  or  command	is
       invoked in seven days.  Both commands also recognize standard abbreviations for the days of the week and months of the year.  The following
       are examples of legitimate commands:
       at 8am jan 24

       at 1530 fr week

       The programs are executed by periodic execution of the command from The granularity of depends upon how often atrun is executed.  The  com-
       mand examines the file every minute.  The file determines when is executed.  The default is every 15 minutes on the 1/4 hour. Editing makes
       run more or less frequently.

       Standard output or error output is lost unless it is redirected.

       The and commands write the job number to standard error.

Options
       -r		   Removes jobs previously scheduled by or The number is the number reported at invocation by or  Only	the  superuser	is
			   allowed to remove another user's jobs.

       -l		   Lists all job numbers for all jobs submitted by the user issuing the command.  Even if the user is "root", only numbers
			   for jobs submitted by "root" are displayed.	To see the numbers of all jobs submitted, enter the following command:
			   % ls -l /usr/spool/at

Restrictions
       Due to the granularity of the execution of there may be bugs in scheduling jobs almost exactly 24 hours into the future.

Diagnostics
       Complains about various syntax errors and times that are out of range.

Files
       /usr/lib/atrun	   executor run by cron(8)

       in /usr/spool/at:
	    yy.ddd.hhhh.*  activity for year yy, day dd, hour hhhh.
	    lasttimedone   last hhhh
	    past	   activities in progress
       /usr/spool/at/at.allowlist of allowed users
       /usr/spool/at/at.denylist of denied users
       /usr/spool/at	   spool directory
       /usr/lib/cron	   XOPEN compatibility

See Also
       crontab(5), cron(8)

																	     at(1)
All times are GMT -4. The time now is 05:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy