![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Red Hat Red Hat is the world's leading open source technology solutions provider with offerings including Red Hat Enterprise Linux (RHEL), Fedora, open source applications, security and systems management, virtualization, and Services Oriented Architecture (SOA) solutions. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Crontab Question. | NycUnxer | UNIX for Dummies Questions & Answers | 9 | 11-14-2007 11:53 AM |
| CRONTAB Question | pauls_579 | UNIX for Dummies Questions & Answers | 2 | 01-23-2007 05:46 PM |
| Crontab question | *Jess* | SUN Solaris | 3 | 07-26-2006 01:19 AM |
| crontab question | steelrose | UNIX for Dummies Questions & Answers | 5 | 10-05-2005 01:07 AM |
| crontab question | Relykk | UNIX for Dummies Questions & Answers | 7 | 03-28-2004 09:02 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Question about crontab file!
Friends , I have the following questions about crontab file : 1) In crontab file I got the folllowing output : Code:
[root@lpt ~]# cat /etc/crontab SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root HOME=/ # run-parts 01 * * * * root run-parts /etc/cron.hourly 02 4 * * * root run-parts /etc/cron.daily 22 4 * * 0 root run-parts /etc/cron.weekly 42 4 1 * * root run-parts /etc/cron.monthly I know that the file under cron.hourly/daily/weekly are system specific executables file . Then If I want to keep a manual script like (test.sh) into cron.daily and i want it runs at 10:00 am everyday, so I edit the crontab file : Code:
00 10 * * * root run-parts /etc/cron.daily But the script(test.sh) is not working . Now my question , is it not possible to run the manual scirpt (not system specific) using cron.daily or cron.hourly directory ? or it is only used for system specific executables file ? Hope I have to clear my question . 2) What is the function of 'run-parts' command . 3) In the below crontab line : Code:
*/5 * * * * /tmp/test.sh what is meaning of 5 ? it it 5 sec or 5 min Waiting for ur kind reply ... ... Last edited by pludi; 10-14-2009 at 04:06 AM.. Reason: code tags, please... |
|
||||
|
1. It is not system specific: If you do everything right, then it should work. 2. man run-parts : man run-parts(8) - run scripts or programs in a directory by debian Translated by humans 3. That is 5 minutes, man 5 crontab Code:
field allowed values ----- -------------- minute 0-59 hour 0-23 day of month 1-31 month 1-12 (or names, see below) day of week 0-7 (0 or 7 is Sun, or use names) |
|
||||
|
copy the script to the directory, don't edit the cron.daily configs.
Also, the script may be failing if the environment variables that you are defining are not set in the script. If you run it manually and it works, but does not in cron, that is usually the case. Also, if you want the script to run at a different interval than the cron.X then just set up a specific cron job for it with crontab -e. the cron.X files are for anacron to manage your jobs. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|