Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

cron(8) [plan9 man page]

CRON(8) 						      System Manager's Manual							   CRON(8)

NAME
cron - clock daemon SYNOPSIS
auth/cron [-c] DESCRIPTION
Cron executes commands at specified dates and times according to instructions in the files /cron/user/cron. It runs only on an authentica- tion server. Option -c causes cron to create /cron/user and /cron/user/cron for the current user; it can be run from any Plan 9 machine. Blank lines and lines beginning with # in these files are ignored. Entries are lines with fields minute hour day month weekday host command Command is a string, which may contain spaces, that is passed to an rc(1) running on host for execution. The first five fields are integer patterns for minute 0-59 hour 0-23 day of month 1-31 month of year 1-12 day of week 0-6; 0=Sunday The syntax for these patterns is time : '*' | range range : number | number '-' number | range ',' range Each number must be in the appropriate range. Hyphens specify inclusive ranges of valid times; commas specify lists of valid time ranges. To run the job, cron calls host and authenticates remote execution, equivalent to running rx host command (see con(1)). The user's profile is run with $service set to rx. Cron is not a reliable service. It skips commands if it cannot reach host within two minutes, or if the cron daemon is not running at the appropriate time. EXAMPLES
Here is the job that mails system news. % cat /cron/upas/cron # send system news 15 8-17, 21 *** helix /mail/lib/mailnews % SOURCE
/sys/src/cmd/auth/cron.c SEE ALSO
con(1), rc(1) CRON(8)

Check Out this Related Man Page

cron(8) 						      System Manager's Manual							   cron(8)

NAME
cron - The system clock daemon SYNOPSIS
/usr/sbin/cron DESCRIPTION
The cron daemon runs shell commands at specified dates and times. Commands that are to run according to a regular or periodic schedule are found within the crontab files. Commands that are to run once only are found within the at files. You submit crontab and at file entries by using the crontab and at commands. Because the cron process exits only when killed or when the system stops, only one cron daemon should exist on the system at any given time. Normally, you start the cron daemon from within a run command file. During process initialization and when cron detects a change, it examines the crontab and at files. This strategy reduces the overhead of checking for new or changed files at regularly scheduled intervals. The cron command creates a log of its activities. The cron daemon must be started from the system startup scripts because it must begin execution without a login user ID set. The cron daemon starts each job with the following process attributes stored with the job by the invoking process: Login user ID Effective and real user IDs Effective and real group IDs Supplementary groups It also establishes the following attributes from the authentication profile of the account associated with the login user ID of the invok- ing process: Audit control and disposition masks Kernel authorizations DIAGNOSTICS
The at and batch programs will refuse to accept jobs submitted from processes whose login user ID is different from the real user ID. FILES
Specifies the command path. Main cron directory Directory containing the crontab files. List of allowed users. List of denied users His- tory information for cron Queue description file for at, batch, and cron RELATED INFORMATION
Commands: at(1), crontab(1), rc0(8), rc2(8), rc3(8) Files: queuedefs(4) delim off cron(8)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

While we are on the subject of dates. Another date question

This goes deeper into the date thing. I want to be able to check the date and time stamp in or on a file to see what the time span is. We have a job that runs several times an hour - kicked off through cron based on a trigger file. We want to keep track of each run and check the time between... (14 Replies)
Discussion started by: MizzGail
14 Replies

2. Shell Programming and Scripting

Problem in Running Script

Hi friends, i have written one small script named as "size.sh"..... while running its giving syntax error at line no 2: 'str=$' unexpected. How to run this file ??? please help me. file content is : ----------------------------- #!/bin/sh str=$( df -k | grep /usr/local)... (14 Replies)
Discussion started by: samfrance
14 Replies

3. Shell Programming and Scripting

How to determine the script is called from CRON?

Hello expert, What I want is to determine whether the script is called from CRON or it is executed interactively? I tried the following but no luck: #!/bin/ksh cronID=`pgrep -x cron` GPID=`ps -ef -o ppid,pid | grep " $PPID$" | awk '{print $1}'` if ; then echo I am being run... (15 Replies)
Discussion started by: wes_brooks
15 Replies

4. Shell Programming and Scripting

Cron job

Hi All I am trying to run a .sh file from cron but its not performing its intended purpose, though the same sh file works fine when triggered manually.Following mail I recieve when it tries to run the script. ********************************************************* To: wlsdev05 Subject:... (16 Replies)
Discussion started by: pankajkrmishra
16 Replies

5. Shell Programming and Scripting

cron job not working for some reasons

I set up a new cron job. I have set cron jobs many times in the past and never faced issues. For some reasons my new cron job is not working.This is how my cron job looks like. plz help me out guys. 3,8,13,18,23,28,33,38,43,48,53,58 * * * * /siebel/sblp900/home/FSMTaskChk/script... (14 Replies)
Discussion started by: ragha81
14 Replies

6. Shell Programming and Scripting

CRON is not working perfectly

I scheduled a cron job to run @ 1:00 as follows , 00 01 * * * /app/cbf/CLIF/version-1.0.0.0/scripts/archival.sh Please find the archival.sh script. But cron is throwing a mail stating sqlplus command not found So can anybody suggest what might be the problem ??? (13 Replies)
Discussion started by: manas_ranjan
13 Replies

7. UNIX for Dummies Questions & Answers

Need help setting up a CRON job

Okay I am not the best at UNIX, so please excuse this if it is a complete ID 10-T error (look at that for a moment...) Logging in via telnet to the server, I want to create a cron job to run various "canned reports" in SAS on a regular basis. No problem, I have the directories, .profile... (14 Replies)
Discussion started by: RussellNonBrand
14 Replies

8. Shell Programming and Scripting

Cron job and shell script to kill a process if memory gets to high

Hello, I'd like to set a cron job that runs a shell script every 30 minutes or so to restart a java based service if the memory gets above 80%. Any advice on how to do this? Thanks in advance! - Ryan (19 Replies)
Discussion started by: prometheon123
19 Replies

9. UNIX for Dummies Questions & Answers

Setting up cron

Hi, The client wants to set up cronjob for trigger alerts to be sent between the hours of 6 AM PST and 12 AM PST . Could you please help me the command to setup cron. scriptname :- triggeralert.ksh Thanks in advance (16 Replies)
Discussion started by: kirankumar
16 Replies

10. Shell Programming and Scripting

Stty: : No such device or address

hi, i am trying to execute a script through Cron, then everytime it is redirecting a message stty: : No such device or address Unmatched ` here is the cron entry: 35,40,45,50,55 04,05 07 08 * /uv1402/u207/home/bravodba/bestdbscript/shscriptfiles/bravo_main_refresh.sh while the script... (20 Replies)
Discussion started by: lovelysethii
20 Replies

11. Shell Programming and Scripting

How to add conditional check of whether a process is running before doing rest of script?

Hi, I'm looking at doing a cron job for a script that could take a very short time to complete or a very long time to complete based on variable activity on a server. I don't want to do a weird schedule, but I don't want to be so aggressive that the process attempts to start before another... (14 Replies)
Discussion started by: nbsparks
14 Replies

12. Shell Programming and Scripting

[Solved] Simple Shellscript for uploading files to a specific folder on a ftp-server?

hi! Iam using my D-link DNS-320 (NAS) with fun_plug installed (a unix client) I am currently using cron to run a shellscript running a java-application that creates a couple of txt files. These files needs to be uploaded to a specific folder on my webhosts ftp server-account. I need a... (16 Replies)
Discussion started by: Nigge
16 Replies

13. Shell Programming and Scripting

Expect script not executing via cron

Hello All, I'm having an issue getting an expect script to run as a cron job. The script executes fin if I run it from the command line but I get nothing when trying to run it as a cron job. I've researched other forums and threads and there have been references to the environment, or lack... (16 Replies)
Discussion started by: KingT617
16 Replies

14. UNIX for Beginners Questions & Answers

Many processes running at the same time

Hello everybody , I launched cron to execute a task every hour but the job takes more than hour that's why I'm getting more than 1000 cron processes running at the same time !!! My question is how to tell cron not to execute unless the job terminated in order to have only one process running .... (14 Replies)
Discussion started by: beautymind
14 Replies

15. Shell Programming and Scripting

Script that will look the same as Cron

Hi All,. need your expertise, is there a way to create a script that will run with specific time without using cron. because i dont have access in cron. TIA (19 Replies)
Discussion started by: meister29
19 Replies