Thursday, 29 May 2014

How the schedule or unschedule workflow using cron job in unix?

Setting the job execution time

With at, you must specify a time the job should execute. The format you use to indicate the time is very flexible and may consist of the following:
  • Time: Enter a one- or two-digit number (0-23) to indicate the start of an hour on a 24-hour clock (e.g., 13 is 13:00 or 1:00pm). To schedule the job to occur at a time other than the start of the hour, add minutes (00-59), optionally separated from the hour by a colon (e.g., 1334 or 13:34). You may follow the number with an am or pm to indicate the specific time on a 12-hour clock (e.g., 1:34pm or 0134pm). You may also use the words nownoon, andmidnight to indicate the current time. If the time you indicate is later than the current time and you haven't specified a date, the job will execute the same day; otherwise, it will execute the next day.
  • Date: You can schedule a job to execute on a specific date. You can use keywords, such as todaytomorrow, or one of the days of the week. The job will execute at the soonest possible date that meets the requirements. You also may enter a fully qualified date, such as November 9, 2010 . The year is optional, and you can use an abbreviation for the month. As long as the date is unambiguous, your job request will probably succeed.
  • Increment: You also can specify the execution time by indicating how far in the future it should be, relative to the current time. To do this, enter a plus sign ( + ), followed by a number and then one of the following keywords:

    • minutes
    • hours
    • days
    • months
    • years
    For example, if the current time is 12:00pm, the increment of +2 weeks would set the execution time at noon on a day two weeks hence.
These elements can be combined, for example:
  • To schedule a job for the following Tuesday at a time two hours later than the current time, use: at tuesday +2 hours
  • To set the execution time for 9:00 in the morning on the second day of next February, use: at 9am February 2
  • To set the execution time for 1:34pm on a date exactly three months from when you issue the at command, use: at 1334 +3 months

No comments:

Post a Comment