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 ?
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:
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:
script
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.
Dear Folks,
I have written a shell script which internally connects to oracle database through sqplplus command line.
The script runs fine when run manually.
Now I am scheduling it to run (Linux environment) from crontab.
In crontab it is failing with an error:
sqlplus command... (6 Replies)
Hi All,
I am facing a problem with crontab.I made an entry in crontab like this
05 07 * * * /afs2/cdwfullacc/current/exe/cdw_generate_special_klant.sh > /afs2/cdwfullacc/current/scratch/cdw_gen_cron.log
But job was not getting executed.
Entry in crontab was made with same user by whom... (4 Replies)
Hi,
I have shell script "A" which is executing oracle pl/sql procedure and initiate its multiple threads at a time as below on given user value in an other script "B".
I want to execute script "A" after every second with out cron tab as " A " will keep on executing after every second till... (1 Reply)
I have an expect script that interrogates several hundred unix servers for both access and directories therein using "ssh user@host ls -l /path". The combination of host/path are unique but the host may be interrogated multiple times if there are multiple paths to test.
The expect script is run... (2 Replies)
Hi
I have shell script to excute the SQL script.And i have scheduled those shell script in crontab.But the Shell script is not running timely and i got the below error
Crontab entry
15 05 17 7 * /export/home/vcpsapp/vcps/stat.sh
Output
Your "cron" job on uspxivus16... (3 Replies)
Hi All,
Do apologise, for it has been a long while since I was last on the forum. I've been doing documentation and primiarily Windows efforts for some while now. :(
We are running a HP-UX 11.23 unit. This morning two separate crontab users executed shutdown scripts of their respective... (14 Replies)
I need your help please
Inin a production system i found crontab entries was removed because i typed crontab -l with username corasc and didn't show anything.
i asked the administrador to restored the mentioned crontab, he restored the crontab:
The problem is when restored the crontab file is... (2 Replies)
is it possible to soecify time overnight in 5 days for example:
0 18-7 * * 1-5 /mycode
is this okay to use 18-7 because im not getting the results correctly? (4 Replies)
I want to execute a shell script without ./ symbol.
For example:
./my_script ===== my_script (both of them can execute my script)
both of them are the same as result. (7 Replies)
I want to execute a shell script without ./ symbol.
For example:
./my_script ===== my_script (both of them can execute my script)
both of them are the same as result. (2 Replies)