Since you did not specify the OS, please pay attention to a few things about cron:
Some OS will send messages (yes error messages...) if the standard output and STD-err are not specified ( redirected to files...)
the same goes if you have in your envirronment things related to interactive shell (e.g TERM set etc...)
be aware also the PATH is VERY limited and no user env. bariable are set...
(That is the first thing that should come to your mind if a job fails when using cron but works when you execute it by command line...)
Last edited by vbe; 06-05-2012 at 11:11 AM..
Reason: typos
To redirect correctly the outputs I think on AIX its not necessary ( I wonder if it doesnt default to /dev/null ) but HP-UX will complain..
The rest stays true... So if you write a job like
Add in the .profile a test for interactive shell or not...
And for compatibility I stick to e.g:
The reason I do not use 1-5 is for the case I have to skip a day...
hi
i am new in solaris. i am accessing server through putty. i could not add entry in crontab.
i have given "crontab -e" for add a new entry. It is not coming. what parameter i have to set for getting crontab -e
thanks (1 Reply)
Hi,
i need to setup a cronjob that has will execute iostat command from morning to evening time.
for instance the timing has will be like this.
8:00 A.M -- 6:00P.M
how to define this entry in crontab
Regards (3 Replies)
Hi Everyone , have a nice day
given below is the line i have added in crontab
* * * * * /Rauf/script2.sh
intended to run this script after every minute , when i run this script manually it runs fine and produces output , but after adding it to crontab ( like given above ) , it doesnt work
... (5 Replies)
Sometimes cron really upsets me and I cant figure out these types of wierd dates, but how do I get cron to run something on every other sunday? I am running Solaris 8.
-S (4 Replies)
hi all
how to schedule a cron job running on last day of every third month at
12 midnight
will the following work
0 0 30,31 3,6,9,12 * <required file>
thanks (3 Replies)