SHIFT

--- Sjoerd Hooft's InFormation Technology ---

User Tools

Site Tools


Sidebar

Sponsor:

Would you like to sponsor this site?
Or buy me a beer?:


Recently Changed Pages:

View All Pages
View All Q Pages


View All Tags


Sign up for Q to post comments.





WIKI Disclaimer: As with most other things on the Internet, the content on this wiki is not supported. It was contributed by me and is published “as is”. It has worked for me, and might work for you.
Also note that any view or statement expressed anywhere on this site are strictly mine and not the opinions or views of my employer.


Terms And Conditions for Q users


Pages with comments

PageDateDiscussionTags
2019/05/01 14:08 2 Comments
2019/03/15 16:02 1 Comment
2019/03/15 16:02 1 Comment
2019/03/15 16:02 3 Comments
2017/04/20 15:28 1 Comment
2017/04/20 15:23 1 Comment
2017/04/19 14:44 1 Comment
2017/04/17 20:10 1 Comment
2017/04/17 20:07 1 Comment
2017/04/17 19:58 1 Comment
2017/04/17 19:52 1 Comment

View All Comments

cron

Cron

Scheduled tasks:

minutes hour dayofmonth month dayofweek user command

* * * * * root everyminute
*/5 * * * * root every5minutes (only works on linux, aix needs 0,5,10,15,20,25,30,35,40,45,50,55)
1 * * * * root everyhour
1 1 * * * root everyday
1 1 * * 0 root everyweek (0=Sunday)
1 1 1 * * root everymonth

In the personal crontab files you need to leave the user out:

* * * * * everyminute

Crontab

To edit a user's crontab enter the command:

crontab -e

To view your crontab file enter the command:

crontab -l

To remove all your crontab jobs enter the command:

crontab -r 

Cron Files

Crontabs:

/var/spool/cron

Cron itself:

/var/adm/cron

Cron logfile on solaris:

/var/cron/log

Cron logfile on solaris:

/var/log/cron

Cron Security

CRON users: To allow root only:

  • remove /var/adm/cron/cron.deny & /var/adm/cron/cron.allow To allow anyone to use it:
  • touch cron.deny if it does not exist. To explicitly allow a user and no one else except root:
  • touch cron.allow & put user ID in it. To explicitly deny a user:
  • touch cron.deny & put user ID in it.

> Note: On Solaris 10 these files are located at /etc/cron.d/

Note: On Red Hat EL 5.5 these files are located at /etc

Cron Editor

Cron uses the editor you want. To make sure it is the one you want use the EDITOR variable:

export EDITOR=vi
You could leave a comment if you were logged in.
cron.txt · Last modified: 2015/01/28 10:16 by sjoerd