LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-07-2010, 10:19 PM   #1
damgar
Senior Member
 
Registered: Sep 2009
Location: dallas, tx
Distribution: Slackware - current multilib/gsb Arch
Posts: 1,949
Blog Entries: 8

Rep: Reputation: 203Reputation: 203Reputation: 203
mirror-slackware-current.sh as a cron job.........probably simple, just not sure.


I have just figured out how to combine slackpkg and Eric's mirror script with options to make my life easier and save the bandwidth of the places which I update from ........Ok so it wasn't difficult, just something I didn't really think about until I went to 3 current boxes and wanted to be as easy on the mirrors as possible. If I wanted to run the script daily from my local file server could I just create the following script and put it in /etc/cron.daily?
Code:
#!/bin/sh
mirror-slackware-current.sh
I've already put Eric's script in /usr/bin and set it executable. Does the cron.daily script need to be set executable as well?
 
Old 05-07-2010, 10:27 PM   #2
escaflown
Member
 
Registered: Apr 2009
Location: Canada
Distribution: Slackware
Posts: 239

Rep: Reputation: 31
I think the -q options of Eric's script is designed for running it in a cron job.
 
Old 05-07-2010, 10:44 PM   #3
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
Quote:
Originally Posted by damgar View Post
I've already put Eric's script in /usr/bin and set it executable. Does the cron.daily script need to be set executable as well?
Yes it would to be executable and should contain full path to the mirror script, if my understanding is correct.
 
1 members found this post helpful.
Old 05-07-2010, 10:45 PM   #4
gmartin
Member
 
Registered: Mar 2003
Location: PA
Distribution: Slackware 13.37 Linux Reg # 341245
Posts: 285

Rep: Reputation: 40
Quote:
Originally Posted by damgar View Post
If I wanted to run the script daily from my local file server could I just create the following script and put it in /etc/cron.daily?
Code:
#!/bin/sh
mirror-slackware-current.sh
I've already put Eric's script in /usr/bin and set it executable. Does the cron.daily script need to be set executable as well?
You could just make a link to the script in cron.daily
 
Old 05-07-2010, 10:55 PM   #5
damgar
Senior Member
 
Registered: Sep 2009
Location: dallas, tx
Distribution: Slackware - current multilib/gsb Arch
Posts: 1,949

Original Poster
Blog Entries: 8

Rep: Reputation: 203Reputation: 203Reputation: 203
But simply being in /etc/cron.daily would be enough for the script to be executed daily?
 
Old 05-07-2010, 10:59 PM   #6
escaflown
Member
 
Registered: Apr 2009
Location: Canada
Distribution: Slackware
Posts: 239

Rep: Reputation: 31
Quote:
Originally Posted by damgar View Post
But simply being in /etc/cron.daily would be enough for the script to be executed daily?
Yes. In my box, I set it up with the following cron job:
Code:
# sync slackware-current
30 21 * * *     /home/escaflown/bin/mirror-slackware-current.sh -q -o DVD
It should be fine in cron.daily too I guess.

Last edited by escaflown; 05-07-2010 at 11:00 PM.
 
1 members found this post helpful.
Old 05-08-2010, 01:17 AM   #7
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
Quote:
Originally Posted by damgar View Post
But simply being in /etc/cron.daily would be enough for the script to be executed daily?
From root's crontab:

# Run daily cron jobs at 4:40 every day:
40 4 * * * /usr/bin/run-parts /etc/cron.daily 1> /dev/null

So yeah, 4:40 am
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with mirror-slackware-current.sh gmartin Slackware 4 06-06-2009 12:07 AM
simple cron job: not working Robert0380 Linux - Software 3 06-24-2008 04:45 AM
Trying to get a simple cron job working walterbyrd Linux - General 3 03-23-2008 12:51 PM
Simple Cron Job question FreezEy Slackware 3 07-11-2006 01:30 PM
how to make a simple code for just restarting Apache via a Cron job hsa Programming 1 08-22-2005 04:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration