what is a chron job?

TechBoyJK

Lifer
Oct 17, 2002
16,699
60
91
A cron job is simply a command you normally run from a shell window that is periodically run at times you specifiy.

So a cronjob could be a command that looks at active TCP connections and emails the printout to me, scheduled at say midnight?
 

RedFox1

Senior member
Aug 22, 2000
587
0
76
There's a software package called cron which lets you schedule tasks (any command or anything you can script can be added to cron)

Most linux distros ship with cron. The hub of it is a cron daemon that starts things according to the schedule you give it. It gets those tasks from cron tables (formatted text files). And the individual tasks are "cron jobs."

-Russ
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
A cron job (no 'h') is anything that runs perodically. It can be sh, perl, python, etc as long as it's runnable from the CLI it can be run inside cron.
 

Need4Speed

Diamond Member
Dec 27, 1999
5,383
0
0
sounds like you get the idea..when i doubt "man <command>" or "man man"
when you dont have a *nix box handy...google "man <command>"
 

skyking

Lifer
Nov 21, 2001
22,621
5,730
146
an example: I purchased one of those cheap dell servers last year, and it came with a second hard drive "free".
It has no raid controller, so I ghosted the server to the second drive.
I wrote a script that mounts the second drive daily, and copies over the databases, then unmounts the drive.
Another script does the same on a weekly basis for changes to the website files.
Both of these are "cron jobs", and are my poor man's raid.
I lost my primary drive to a UPS incident last week, and it was pretty painless to switch to the other drive.