[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Cron few days a month

Posted on 2011-03-02
6
Medium Priority
?
422 Views
Last Modified: 2012-05-11
I wonder if there is a way to cron a job using @monthly to run from 3rd to 6th of every month, once a day only.
0
Comment
Question by:farzanj
6 Comments
 
LVL 6

Expert Comment

by:night_monkey
ID: 35023899
how about setting up four separate identical cron jobs with a different schedule? setting each to run on the 3rd, 4th, 5th, and 6th?

too clunky?
0
 
LVL 1

Accepted Solution

by:
BasementCat earned 668 total points
ID: 35024045
I believe you can put multiple values in a single field in your crontab file, like so:
0    0   3,4,5,6    *    *   ./your-command

Open in new window

which would run the command on the 3rd, 4th, 5th, and 6th of every month at 12:00 am
0
 
LVL 12

Assisted Solution

by:mccracky
mccracky earned 332 total points
ID: 35024088
BasementCat is correct and bear me to it.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 12

Expert Comment

by:mccracky
ID: 35024090
s/bear/beat/
0
 
LVL 1

Assisted Solution

by:BasementCat
BasementCat earned 668 total points
ID: 35024097
As a side note, you may be able to use a hyphenated range instead - rather than 3,4,5,6 you probably can use 3-6
0
 
LVL 31

Author Closing Comment

by:farzanj
ID: 35024109
Sorry, dumb question
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month18 days, 16 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question