Crontab Execution

Hi Guys,

I need help to clear my doubt w.r.t Crontab execution.

uname -a
HP-UX myservername B.11.31 U ia64 1422528451 unlimited-user license

I created a crontab entry to execute particular job on Saturday 11/15/2014 11:22
Below is the cron entry

#refresh DEVDB from PRODDB
22 11 15 11 6 /stage01/refresh/database/DEVDB/scripts/refresh_DEVDB.ksh > /tmp/refresh_DEVDB.log 2>&1

I assumed this job will execute only once on Saturday 11/15/2014 11:22 but unfortunately this job executed automatically on following saturday also i.e. 11/22/2014 11:22 [ Saturday ]
Is it supposed to work this way ? Is specifying day in cron is OR condition ?

Pls advice.

Yes...
What you have on your line is I read: Execute in november on the 15th and all saturday...
If you wanted an a specific day you should have wrote a line with just the month day since you have chosen a specific month it can only be the day you want...

Thanks for your reply.
So as per my entry, will it not execute only once as in Nov 15th and Saturday wil come only once ?
Can you please provide the entry I should have used to execute job on Nov 15, 11:22 [ once in lifetime/Year ]. This raises another question in my mind. There is no specification for year so this job will execute every year right ? Is ther way to specify only current year ?

Sorry I was very unclear, I forgot that I meant in that case since only executing once:
it would have been using at command
As for cron:

# ==========================================================================
#      F O R M A T
# ==========================================================================
#  Minute    Hour    Month_Day    Month    Weekday    Command
#  (0-59)   (0-23)   (1-31)       (1-12)   (0-6)*0=sun run-string
#  * = in any crontab field represents all legal values.

Keep above in mind
So
22 11 15 11 6 would be at 11:22 on the 15th - and saturdays of November!
the monthday and day of week are to be understood as "and also on "
In any case you would have to write a test :
For saturdays, your job should test on the date: Is it the 15th?
For the 15th day of month, test if its a saturday...
Search the forums for examples in shell programming forum

You have two problems: Nov 15 is not a Saturday every year and you will have to test the year either in your script or in the crontab line:
Assume you want 2015:

crontab example:

22 11 15 11 * [ `date +%Y` - eq 2015 ] && /stage01/refresh/database/DEVDB/scripts/refresh_DEVDB.ksh > /tmp/refresh_DEVDB.log 2>&1

script

#!/bin/ksh
# this is called a guard structure (or block)
if [ `date +%Y` -eq 2015 ] ; then

# all of your old script goes here
# or you can simply call your old scipt:  /path/to/myscript.sh

fi  # end of guard block

This is not a good use of crontab. I suspect you want to run this thing the third Saturday of every November, not just once every 5-7 years. IF you need to run it JUST ONCE, the use at:

You should refer to your man page for the at command, because some varieties of at use slightly different syntax. I think HP's at is one of them.

Thank you all for responses.

Thanks for responses/help.