Make program/application/process Autorun in Scheduled time
Posted Under: General
cron is a built-in utility in Linux that makes program/application/process run without manual intervention.
You can use following to start,stop,restart,and reload the service in your system:
/sbin/service crond start /sbin/service crond stop /sbin/service crond restart /sbin/service crond reload
And configure scheduled tasks in this format:
minute hour day month week [user_name] command
minute: means which minute in hours to run the task,range from 0-59.
hour:means which hour to run the task,range from 0-23.
day:means which day to run the task,range from 1-31.
month:means which month to run the task,range from 1-12.
week:means which day in one week to run the task,range from 0-6.0 stands for Sun.
user_name: means use which user to run the task,leave out to use current user.
command: command and parameter to run the task.
In the directory /etc,there are several folders such as cron.daily,cron.hourly,cron.monthly,cron.weekly.You can create shell into one of these folders.
For example,we want nutch run at every 9:00 am:
cd /etc/cron.daily
touch autonutch.sh
chmod 755 autonutch.sh
echo "/home/sunny/nutch/bin/nutch crawl urls -dir crawl" > autonutch.sh
more autonutch.sh
For desktop version,there’s a GUI available from Applications/Add&Remove named Scheduled tasks.
Related posts:
- How to make program autorun at login
- Install and Enable Telnet server in Ubuntu Linux
- List of commands determine system info/resources/partitions/process in Ubuntu Linux
- GShutdown-GUI Tool for scheduled shutdown/restart in Ubuntu
- How to find specific command for launching application
