Hot Downloads



The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: automatic scheduling FedoraCore4

automatic scheduling FedoraCore4 12 years 10 months ago #14522

  • gainil
  • gainil's Avatar Topic Author
  • Offline
  • Frequent Member
  • Frequent Member
  • Posts: 52
  • Thank you received: 0

I have FedoraCore 4. I have made a sh script for making tars of some folders, which i use for backup. Now I am doing it manually every day. Is ther any utility/software, with which I can run that script automatically daily at some perticular time??


Re: automatic scheduling FedoraCore4 12 years 10 months ago #14523

use "cron"

Re: automatic scheduling FedoraCore4 12 years 10 months ago #14529

  • Chris
  • Chris's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 1447
  • Karma: 8
  • Thank you received: 13

As eylli suggest, you can automate this process by using 'Cron' jobs.

Cron is really two separate programs. The cron daemon, usually called cron or crond, is a continually running program that is typically part of the booting-up process.

The crond process wakes up each minute to check a set of cron table files that list tasks and the times when those tasks are to be performed. If any programs need to be run, it runs them and then goes back to sleep.

In Linux, each user has its own Crontab entries, so be sure to use one only user to execute the commands you require for that specific process.

The crontab utility has three options: -l, -r, and -e. The -l option lists the contents of the current table file for your current userid, the -e option lets you edit the table file, and the -r option removes a table file.

A cron table file is made up of one line per entry. An entry consists of two categories of data: when to run a command and which command to run.

A line contains six fields, unless it begins with a hash mark (#), which is treated as a comment. The six fields, which must be separated by white space (tabs or spaces), are:

1. Minute of the hour in which to run (0-59)
2. Hour of the day in which to run (0-23)
3. Day of the month (0-31)
4. Month of the year in which to run (1-12)
5. Day of the week in which to run (0-6) (0=Sunday)
6. The command to execute

Here are some examples to help you understand how you can apply all the above:

crontab -l

3 # installed Sat Jul 15
4 #min hr day mon weekday command
6 30 * * * * some_command
7 15,45 1-3 * * * another_command
8 25 1 * * 0 sunday_job
9 45 3 1 * * monthly_report

Lines 2 through 4 contain comments (#) and are ignored.
Line 6 runs the command some_command at 30 minutes past the hour.
Note that the fields for hour, day, month, and weekday were all left with the asterisk; therefore some_command runs at 30 minutes past the hour, every hour of every day.
Line 7 runs the command another_command at 15 and 45 minutes past the hour for hours 1 through 3, namely, 1:15, 1:45, 2:15, 2:45, 3:15, and 3:45 a.m.
Line 8 specifies that sunday_job is to be run at 1:25 a.m., only on Sundays.
Line 9 runs monthly_report at 3:45 a.m. of the first day of each month.

Again, the crontab editor to edit a new crontab entry. In this example I am asking cron to execute something every minute.

[code:1]#crontab -e
0-59 * * * * echo `date` "Hello" >>$HOME/junk.txt [/code:1]

The sixth field contains the command to echo the output from date (note the reverse quotes around date), followed by "Hello", and also the command to append the result to a file in my home directory, which is named junk.txt.

If you experience any problems or difficulties with the crontab editor, let us know!

Good luck!
Chris Partsenidis.
Founder & Editor-in-Chief

Re: automatic scheduling FedoraCore4 12 years 10 months ago #14537

  • gainil
  • gainil's Avatar Topic Author
  • Offline
  • Frequent Member
  • Frequent Member
  • Posts: 52
  • Thank you received: 0

Thanks eylli, I didnt know what is 'cron'.

Many thanks to you Chris, for explaining me in detail and also give example for the same. I tried the same exaple on my linux box, it is working fine, now I am gonaa try it for the script i mentioned in my earlier post.

I will let you know if any queries.

you guys at are simply great!!!

Thanks and Regards to all
  • Page:
  • 1
Time to create page: 0.106 seconds


Cisco Routers

  • SSL WebVPN
  • Securing Routers
  • Policy Based Routing
  • Router on-a-Stick

VPN Security

  • Understand DMVPN
  • GRE/IPSec Configuration
  • Site-to-Site IPSec VPN
  • IPSec Modes

Cisco Help

  • VPN Client Windows 8
  • VPN Client Windows 7
  • CCP Display Problem
  • Cisco Support App.

Windows 2012

  • New Features
  • Licensing
  • Hyper-V / VDI
  • Install Hyper-V


  • File Permissions
  • Webmin
  • Groups - Users
  • Samba Setup