Linux Gurus: how-to on automated processes via CLI?

NikPreviousAcct

No Lifer
Aug 15, 2000
52,763
1
0
My goal is to find either just a basic CLI syntax to build/edit/maintain/check or verify processes or scripts that are executed automatically at a specific time of day every day (like reoccurring daily) so that I can have something to start with and teach myself (a lotta that goin' on around here lately). Either that or get some links to online guides and resources that will explain in detail how they work.

OS-independent is much preferred, but if that isn't a possibility, I'll need Gentoo- and RH9-compatible scripts. I'm looking through Google, but I haven't found anything yet. That's what I get for just having started searching. I'll check this thread later for possible responses. Thanks. :)
 

ttown

Platinum Member
Oct 27, 2003
2,412
0
0
It's a bit unclear to me what you want....

You either want to create "cron" jobs, or you want to check on the status of cron jobs... ?

I usually have each automated job record it's status in a file, or include in the script the "mail ..." command so I have the status emailed to me.
It's either too early for me, or maybe you could better explain what you want.

link to cron tutorial: here
link to shell programming/scripting basics: here
 

ITJunkie

Platinum Member
Apr 17, 2003
2,512
0
76
www.techange.com
Here's a great Link to some useful guides.

If this is something like what you were looking for, send a beer to DRAG as the link is in his sig :)

Thanks again Drag for finding this, I've found it very useful :beer:
 

Armitage

Banned
Feb 23, 2001
8,086
0
0
I'll 2nd What others have said, and add a bit.

One thing I often do for scripts run via cron is to wrap the whole thing in a big try/except block and send out an email if it fails. This is in addition to regular error checking, and catches unexpected stuff, like your sysadmin uninstalling key libraries without notice ... don't ask.

On a past project, I was using NetSaint (now Nagios IIRC) to monitor a bunch of stuff. All the cron jobs wrote a log file, so I wrote a NetSaint plugin to check the last access time for each of the log files and corellate it against the cron config. So if something didn't go off for some reason, you'd see it on the NetSaint status. That script also eventually parsed the log files for a tag indicating success or failure & the date.
 

NikPreviousAcct

No Lifer
Aug 15, 2000
52,763
1
0
Wow, thanks folks. Exactly what I need. Crond. In fact, I might even just need .netrc to solve my issues. Thanks again folks.