ONTAP Discussions

Monthly cron snapshot schedule?

J-L-B
7,041 Views

I set up a "monthly" cron schedule to create a snapshot of a volume every month (Jan - Dec) at 19 after midnight.  It's creating a monthly every night now at 19 after midnight?  Anyone else doing this or have any insight?

 

I have a snapshot policy keeping 6 daily, 14 weekly, and 12 monthly using the below.  No hourly's.


daily               @0:10
hourly              @:05
monthly             Jan-Dec@0:19
weekly              Sun@0:15

4 REPLIES 4

aborzenkov
7,016 Views
Define "every month" 🙂 The schedule does run every month, but you did not tell it at which day, so it also runs every day.

If you want to run it once a month, pick day and set it in schedule (-day), e.g. first day of month. You do not even need to set months in this case.

J-L-B
6,983 Views

I used

 

monthly             Jan-Dec 1@0:15

 

That's each month, 1st day of each month, 15 minutes after midnight.

 

Thanks.

ASICDAVID_LEE
6,620 Views

Hi,

 

Did you ever get to the bottom of your monthly cron schedule problem ?

 

I created an advanced cron schedule yesterday via Systems Manager (8.3P1) called "monthly" with Jan-Dec 1@0:30 and for some reason it decided to create one last night on 28th July. I was expecting it to only create a snapshot on 1st July @12:30am. 

 

Not sure why it started early.

 

Dave.

J-L-B
6,594 Views

I was using 8.3.2p4 (now p9).   It's been working without any issues.  If it kicked off last night check the policy again that uses that schedule.  Looks like your cron schedule is correct, but maybe not applied right on the snapshot policy.  

 

Here's what my config looks like.  

 

The SysMgr GUI for the Monthly schedule (created under Cluster>Configuration>Schedules) shows this:

 

    Runs at:

    Months: January, February, March, April, May, June, July, August, September, October, November, December
    Days: 1st day
    Hours: 12 AM
    Minutes: 15th minute

 

 

 

 

 

Here's the cron schedule for the Monthly schedule from the CLI

 

ontapcluster1::> schedule cron show *Monthly*
(job schedule cron show)
Name Description
---------------- -----------------------------------------------------
Monthly Jan-Dec 1@0:15

 

 

 

 

 

 

Here's the snapshot policy applied to the volumes I tested from the CLI

 


ontapcluster1::> volume snapshot policy show -vserver ontapsvm1
Vserver: ontapsvm1
                            Number of      Is
Policy Name     Schedules     Enabled Comment
------------------------ --------- ------- ----------------------------------
SVM_Daily14_Weekly6_Monthly12    3    true -


Schedule Count Prefix SnapMirror Label
---------------------- ----- ---------------------- -------------------
Daily       14      Daily         Daily
Weekly   6        Weekly     Weekly
Monthly  12      Monthly    Monthly

Public