Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Location: United States of America and damn proud of it!
Distribution: Windows 10 prior Red Hat User
Posts: 473
Original Poster
Rep:
Where did I get the file? I went to /etc/crontab. Second, isn't 8:00 in the evening 2000 hours? I'm confused as to how the times correlate to real time.
Also, will the file run in the background so I won't be interrupted with what I may be doing or will it interrupt me?
Last edited by scottpioso; 11-27-2003 at 01:41 PM.
Originally posted by scottpioso Where did I get the file? I went to /etc/crontab. Second, isn't 8:00 in the evening 2000 hours? I'm confused as to how the times correlate to real time.
Also, will the file run in the background so I won't be interrupted with what I may be doing or will it interrupt me?
Hmmm ... must be a RH thing... if I want to
add something to crontab I do
crontab -e, the result is then stored in
/var/spool/cron/crontabs/<user-id>
As for the format
man crontab
Code:
# MIN HOUR DAY MONTH DAYOFWEEK COMMAND
# at 6:10 a.m. every day
10 6 * * * date
# every two hours at the top of the hour
0 */2 * * * date
# every two hours from 11p.m. to 7a.m., and at 8a.m.
0 23-7/2,8 * * * date
# at 11:00 a.m. on the 4th and on every mon, tue, wed
0 11 4 * mon-wed date
# 4:00 a.m. on january 1st
0 4 1 jan * date
# once an hour, all output appended to log file
0 4 1 jan * date >>/var/log/messages 2>&1
So yes, it's 2000 (military speak) but
00 20 for cron ...
Look at this line:
# MIN HOUR DAY MONTH DAYOFWEEK COMMAND
Location: United States of America and damn proud of it!
Distribution: Windows 10 prior Red Hat User
Posts: 473
Original Poster
Rep:
Ah,, I see now, Tink. Thanks. However, you didn't answer my question about running in the background or will this interrupt whatever I may be working on at the time the job runs?
Location: United States of America and damn proud of it!
Distribution: Windows 10 prior Red Hat User
Posts: 473
Original Poster
Rep:
This is what it gives me. It would appear that I need a flag in there somewhere, but that doesn't really make any sense as the other entries don't have flags.
Is there a test I can run on this file to check it for syntax?
CRONTAB(1) CRONTAB(1)
NAME
crontab - maintain crontab files for individual users (V3)
SYNOPSIS
crontab [ -u user ] file
crontab [ -u user ] { -l | -r | -e }
Location: United States of America and damn proud of it!
Distribution: Windows 10 prior Red Hat User
Posts: 473
Original Poster
Rep:
DESCRIPTION
Crontab is the program used to install, deinstall or list the tables
used to drive the cron(8) daemon in Vixie Cron. Each user can have
---> their own crontab, and though these are files in /var, they are not
intended to be edited directly.
If the allow file exists, then you must be listed therein in order to
be allowed to use this command. If the allow file does not exist but
the deny file does exist, then you must not be listed in the deny file
in order to use this command. If neither of these files exists, then
depending on site-dependent configuration parameters, only the super
user will be allowed to use this command, or all users will be able to
use this command.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.