News:

Facebook killed the radio star. And by radio star, I mean the premise of distributed forums around the internet. And that got got by Instagram/SnapChat. And that got got by TikTok. Where the fuck is the internet we once knew?

Main Menu

Joe <3 cron!

Started by Joe, March 28, 2006, 07:45:26 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Joe

Yup. I'm not sure it if's just debian/ubuntu, or it's for all of Linux (I assume the latter), but it's a scheduling daemon. Right now, here's root's crontabs.

30 22 * * * echo "Starting dist-upgrade: $(date)" >> /tmp/update.log && /usr/bin/apt-get update -y && /usr/bin/apt-get dist-upgrade -y


From the Ubuntu Wiki Page about cron, it says that the first five spaces (here: "30 22 * * *") specify, in order, the *minute*, *hour*, *day of month*, *month* and *day of week*.

So I have these tasks scheduled to occur at 10:30 (2230 military time) each night:
Make a note about system upgrade in /tmp/update.log
Get list of latest updates (apt-get update -y)
Download + install them (apt-get dist-upgrade -y)
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


Newby

That's ridiculous. That's gonna be such a bandwidth whore.

Good idea though, if you can afford the bandwidth/CPU speed you'll be eating 10:30 each night downloading and installing shit. :P
- Newby
http://www.x86labs.org

Quote[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

Quote from: Rule on June 30, 2008, 01:13:20 PM
Quote from: CrAz3D on June 30, 2008, 10:38:22 AM
I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT. 

rabbit

If your distro gets minor updates every now and then, once a week is best.  Otherwise I'd personally set it to once a month or quarter.

iago

Any distro CAN run cron, and every distro that I'm familiar with does. 

On darkside, I have a nightly crontab to back up key databases and files. 

Joe

Quote from: Newby on March 28, 2006, 08:40:02 AM
That's ridiculous. That's gonna be such a bandwidth whore.

Good idea though, if you can afford the bandwidth/CPU speed you'll be eating 10:30 each night downloading and installing shit. :P

I can EASILY afford the CPU speed (2.8GHz runs Linux like nobody's business), and afford the bandwidth (nobody will be awake until 6:30 the next morning). And the only time I'll be downloading is if an update comes out. Apt-get update will check hit/miss on the repository lists, and if theres a miss THEN it downloads the list, and apt-get dist-upgrade will only download if everything isn't current.

Quote from: rabbit on March 28, 2006, 09:44:43 AM
If your distro gets minor updates every now and then, once a week is best.  Otherwise I'd personally set it to once a month or quarter.

It's pretty much configured for when I switch to dapper drake (development version), so I don't get piled up on. But yeah, this is a bit overkill.
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


Newby

I should do something similar to this with FreeBSD && portupgrade.
- Newby
http://www.x86labs.org

Quote[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

Quote from: Rule on June 30, 2008, 01:13:20 PM
Quote from: CrAz3D on June 30, 2008, 10:38:22 AM
I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT. 

Joe

Btw, this idea is copywrite 2006 Joe. (kidding, but still.. royalty please).
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


Sidoh

Quote from: iago on March 28, 2006, 02:47:12 PM
On darkside, I have a nightly crontab to back up key databases and files. 

Hehe, I do the same on deepthought.  Crontabs are so more straightforward and flexible than Windows' "Scheduled Tasks."

Ergot

I use cron to stop my computer from flying ahead 1 minute every week >:\
Quote from: Newby on February 26, 2006, 12:16:58 AM
Who gives a damn? I fuck sheep all the time.
Quote from: rabbit on December 11, 2005, 01:05:35 PM
And yes, male both ends.  There are a couple lesbians that need a two-ended dildo...My router just refuses to wear a strap-on.
(05:55:03) JoE ThE oDD: omfg good job i got a boner thinkin bout them chinese bitches
(17:54:15) Sidoh: I love cosmetology

Joe

Why the hell would it do that? =p

EDIT -
My computer is sync'd with USAC on startup. Not that I need to restart very often.
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


Sidoh

Quote from: Ergot on March 29, 2006, 12:54:04 AM
I use cron to stop my computer from flying ahead 1 minute every week >:\

I have a crontab to do that as well. :)

Quote from: Joe on March 29, 2006, 09:59:59 AM
Why the hell would it do that? =p

EDIT -
My computer is sync'd with USAC on startup. Not that I need to restart very often.

* Sidoh shrugs.

His CPU is in relative motion, I'd say. ;)

iago

Quote from: Ergot on March 29, 2006, 12:54:04 AM
I use cron to stop my computer from flying ahead 1 minute every week >:\

Speaking of that, what's the command to update to a NTS server?  Darkside tends to lose time, so it would help to update it nightly. :)

Ergot

Quote from: Newby on February 26, 2006, 12:16:58 AM
Who gives a damn? I fuck sheep all the time.
Quote from: rabbit on December 11, 2005, 01:05:35 PM
And yes, male both ends.  There are a couple lesbians that need a two-ended dildo...My router just refuses to wear a strap-on.
(05:55:03) JoE ThE oDD: omfg good job i got a boner thinkin bout them chinese bitches
(17:54:15) Sidoh: I love cosmetology

Joe

Hehe @ darkside being to slow to even keep track of time.
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


Sidoh

Quote from: Joe on March 30, 2006, 07:49:35 AM
Hehe @ darkside being to slow to even keep track of time.

It happens.  It's because his CPU is in relative motion.  Duh.