- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: at job question
Operating System - Linux
1753776
Members
7051
Online
108799
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-30-2009 11:16 AM
тАО09-30-2009 11:16 AM
at job question
Hi Folks,
I want to schedule multiple at jobs for different days -
The job should run at 6pm everyday on wednesday, thursday, friday, sat, sun & mon.
How do I do that in Linux.
Dont want a cron entry since all of my cron is source controlled and I dont want to touch that.
Thanks,
Allan
I want to schedule multiple at jobs for different days -
The job should run at 6pm everyday on wednesday, thursday, friday, sat, sun & mon.
How do I do that in Linux.
Dont want a cron entry since all of my cron is source controlled and I dont want to touch that.
Thanks,
Allan
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-30-2009 12:03 PM
тАО09-30-2009 12:03 PM
Re: at job question
HI
I'd put everything into a file and then just read the file every X hours.
at [ [CC]YY]MMDDhhmm [ . ss ] -or-
at 200910010000.00 (* midnight 10/01 *)
at -f job-file
Here's the format to follow for 'at' commands within the file
-t spectime Define the absolute time to start the job.
spectime A date and time in the format:
[ [CC]YY]MMDDhhmm [ . ss ]
where the decimal digit pairs are as follows:
CC The first two digits of the year (19, 20).
YY The second two digits of the year (69-99, 00-68). See WARNINGS.
MM The month of the year (01-12).
DD The day of the month (01-31).
hh The hour of the day (00-23).
mm The minute of the hour (00-59).
ss The second of the minute (00-61).
If both CC and YY are omitted, the default is the current year.
If CC is omitted and YY is in the range 69-99, CC defaults to 19.
Otherwise, CC defaults to 20.
The range for ss provides for two leap seconds. If ss is 60 or 61, and
the resulting time, as affected by the TZ environment variable, does
not refer to a leap second, the time is set to the whole minute following
mm.
If ss is omitted, it defaults to 00.
time [date] Define the base time for starting the job.
time A time specified as one, two, or four digits. One- and two-digit
numbers represent hours; four digits represent hours and minutes.
Alternately, time can be specified as two numbers separated by a
colon (:), a single quote (├в ), the letter h (h), a period (.), or a comma
(,). Spaces may be present between the separator and digits
representing minutes. If defined in langinfo(5), special time unit
characters can be used.
am or pm can be appended to indicate morning or afternoon. Otherwise,
a 24-hour clock is understood. For example, 0815, 8:15,
8├в 15, 8h15, 8.15, and 8,15 are read as 15 minutes after eight in
the morning. The suffixes zulu and utc can be used to specify Coordinated
Universal Time (UTC), equivalent to Greenwich Mean Time
(GMT).
The special names midnight, noon, and now are also recognized.
date A day of the week (fully spelled out or abbreviated) or a date consisting
of a day, a month, and optionally a year. The day and year fields
must be numeric, and the month can be either fully spelled out, abbreviated,
or numeric. The fields in the date string are separated by
punctuation marks such as slash (/), hyphen (-), period (.), and
comma (,). If defined in langinfo(5), special date unit characters can
Section 1-28 - 2 - HP-UX Release 11i: December 2000
a
at(1) at(1)
be present. A field having a value greater than 31 is treated as the
year field and the remaining two fields in the date string are treated
as month and day fields. Otherwise, if a given date is ambiguous (such
as 2/5 or 2/5/10), the D_T_FMT string (if defined in langinfo(5)) is
used to resolve the ambiguity.
Two special days, today and tomorrow, are also recognized. If no
date is given, today is assumed if the given time is greater than the
current time; tomorrow is assumed if it is less.
If the given month is less than the current month (and no year is
given), next year is assumed. Two-digit years in the range 69 to 99
are expanded to 1969 to 1999; in the range 00 to 68, to 2000 to 2068.
I'd put everything into a file and then just read the file every X hours.
at [ [CC]YY]MMDDhhmm [ . ss ] -or-
at 200910010000.00 (* midnight 10/01 *)
at -f job-file
Here's the format to follow for 'at' commands within the file
-t spectime Define the absolute time to start the job.
spectime A date and time in the format:
[ [CC]YY]MMDDhhmm [ . ss ]
where the decimal digit pairs are as follows:
CC The first two digits of the year (19, 20).
YY The second two digits of the year (69-99, 00-68). See WARNINGS.
MM The month of the year (01-12).
DD The day of the month (01-31).
hh The hour of the day (00-23).
mm The minute of the hour (00-59).
ss The second of the minute (00-61).
If both CC and YY are omitted, the default is the current year.
If CC is omitted and YY is in the range 69-99, CC defaults to 19.
Otherwise, CC defaults to 20.
The range for ss provides for two leap seconds. If ss is 60 or 61, and
the resulting time, as affected by the TZ environment variable, does
not refer to a leap second, the time is set to the whole minute following
mm.
If ss is omitted, it defaults to 00.
time [date] Define the base time for starting the job.
time A time specified as one, two, or four digits. One- and two-digit
numbers represent hours; four digits represent hours and minutes.
Alternately, time can be specified as two numbers separated by a
colon (:), a single quote (├в ), the letter h (h), a period (.), or a comma
(,). Spaces may be present between the separator and digits
representing minutes. If defined in langinfo(5), special time unit
characters can be used.
am or pm can be appended to indicate morning or afternoon. Otherwise,
a 24-hour clock is understood. For example, 0815, 8:15,
8├в 15, 8h15, 8.15, and 8,15 are read as 15 minutes after eight in
the morning. The suffixes zulu and utc can be used to specify Coordinated
Universal Time (UTC), equivalent to Greenwich Mean Time
(GMT).
The special names midnight, noon, and now are also recognized.
date A day of the week (fully spelled out or abbreviated) or a date consisting
of a day, a month, and optionally a year. The day and year fields
must be numeric, and the month can be either fully spelled out, abbreviated,
or numeric. The fields in the date string are separated by
punctuation marks such as slash (/), hyphen (-), period (.), and
comma (,). If defined in langinfo(5), special date unit characters can
Section 1-28 - 2 - HP-UX Release 11i: December 2000
a
at(1) at(1)
be present. A field having a value greater than 31 is treated as the
year field and the remaining two fields in the date string are treated
as month and day fields. Otherwise, if a given date is ambiguous (such
as 2/5 or 2/5/10), the D_T_FMT string (if defined in langinfo(5)) is
used to resolve the ambiguity.
Two special days, today and tomorrow, are also recognized. If no
date is given, today is assumed if the given time is greater than the
current time; tomorrow is assumed if it is less.
If the given month is less than the current month (and no year is
given), next year is assumed. Two-digit years in the range 69 to 99
are expanded to 1969 to 1999; in the range 00 to 68, to 2000 to 2068.
Support Fatherhood - Stop Family Law
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-30-2009 12:05 PM
тАО09-30-2009 12:05 PM
Re: at job question
HI Again
Here's a better example
at -f $HOME/jobfile -t201312271220.00
Here's a better example
at -f $HOME/jobfile -t201312271220.00
Support Fatherhood - Stop Family Law
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-03-2009 10:01 AM
тАО10-03-2009 10:01 AM
Re: at job question
>Don't want a cron entry since all of my cron is source controlled
I would suggest you still use cron, it is meant for what you want to do. Just one entry:
00 18 * * 0,1,3,4,5,6 command
With at(1), you have to keep restarting it. You could include your at(1) command within your script, with a check to ignore Tuesday.
I would suggest you still use cron, it is meant for what you want to do. Just one entry:
00 18 * * 0,1,3,4,5,6 command
With at(1), you have to keep restarting it. You could include your at(1) command within your script, with a check to ignore Tuesday.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP