appending lines to crontab in Solaris without "crontab -e"

Q1:
Which file in Solaris 10 holds root's crontab entries?

Q2:
how can I append lines to the crontab without using "crontab -e" ?

I have a central tool which allows me to issue commands remotely
but not in editor's mode.

By knowing the file which holds root's crontab entries, I can issue
   cat "0 8 * * * jobname" >> crontabfile  
to append to the crontab, right?
sunhuxAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Shiju JacobInfo Security ManagerCommented:
See the comments below

Which file in Solaris 10 holds root's crontab entries?

                      /var/spool/cron/crontabs

how can I append lines to the crontab without using "crontab -e" ?
       
                   vi    /var/spool/cron/crontabs

You can edit the files using cat "0 8 * * * jobname" >> /var/spool/cron/crontabs
serialbandCommented:
If you're running as root, that should probably be
vi    /var/spool/cron/crontabs/root
cat "0 8 * * * jobname" >> /var/spool/cron/crontabs/root

If you're running as USER_NAME, that should probably be
vi    /var/spool/cron/crontabs/USER_NAME
cat "0 8 * * * jobname" >> /var/spool/cron/crontabs/USER_NAME
Gerwin Jansen, EE MVETopic Advisor Commented:
Are you able to run vi remotely, probably not since 'crontab -e' would also invoke vi.

In that case you would only be able to add a line using an echo statement, like this:

echo "0 8 * * * jobname" >> /var/spool/cron/crontabs/root

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sunhuxAuthor Commented:
Yes, I can't use vi remotely & noted on the root user's crontab

Thanks very much chaps.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.