9 Replies Latest reply on Sep 20, 2018 4:11 PM by Dude!

    How can I share my cron file to the rest of my group?

    Tater_Salad

      HI,

       

      We're using Linux

      NAME="Red Hat Enterprise Linux Server"

      VERSION="7.4

       

      I we do not have a common cron file to add our cron jobs to. Our Admin has not set one up.

       

      So I'm relegated to putting commands in my own personal cron file then sharing it to the group.

       

       

      I don't know if I can use chmod to change permissions on it.

       

      How can I share my cron file so others can access it and add to it if need be. In other words rw access.

       

      I think my physical file is in the directory

       

      /var/spool/cron/crontabs/
      

       

      But I don't have permission to get to it.

       

      Am I going to need it?

       

      The other question is should we pool our admin and make a case to have our admin set up a global cron file owned by root the way it is in most shops?

        • 1. Re: How can I share my cron file to the rest of my group?
          EdStevens

          Tater_Salad wrote:

           

          HI,

           

          We're using Linux

          NAME="Red Hat Enterprise Linux Server"

          VERSION="7.4

           

          I we do not have a common cron file to add our cron jobs to. Our Admin has not set one up.

           

          So I'm relegated to putting commands in my own personal cron file then sharing it to the group.

           

           

          I don't know if I can use chmod to change permissions on it.

           

          How can I share my cron file so others can access it and add to it if need be. In other words rw access.

           

          I think my physical file is in the directory

           

          1. /var/spool/cron/crontabs/

           

          But I don't have permission to get to it.

           

          Am I going to need it?

           

          The other question is should we pool our admin and make a case to have our admin set up a global cron file owned by root the way it is in most shops?

          "The way it is in most shops?"

          Most shops?

          Gee, I've never seen it, and I've been in this business since 1981.

           

          I don't think there even IS such a thing as a "common crontab".    Perhaps if you'd describe, in detail, what you have seen in "most shops".  I think perhaps you misunderstand what you think you saw.

          • 2. Re: How can I share my cron file to the rest of my group?
            Tater_Salad

            Let me explain most shops: You go into a company that uses cron to schedule things in Linux (Stop me if I'm going too fast for you).

             

            You type crontab -e to add your cron file command and schedule settings. A cron file opens up like Magic ( Magic Dude! Magic!)

             

            You see other cron jobs in there added by other users. ( Is "other shops" starting to make sense yet?).

             

            But you see they can type "crontab -e" and get the SAME BLOODY FILE!!! WHY?!? BECAUSE ROOT ( Sorry "root") CREATED IT!!!

             

            MOST SHOPS!!! Now you see HERE( this shop) I type "crontab -e" and I get an empty cron file when my co-worker types in "crontab -e" and gets...

            #------------------------------------------------------------------
            # General section:
            #
            # 1. Remove Oracle trace files and audit files
            # 2. Monitor DB server and listener every minute
            # 3. remove crontab output files
            # 4. check for export errors
            #
            #------------------------------------------------------------------
            #
            20 9 * * * /export/home/dba/sh-scripts/RmOracleTraceFiles.sh > /dev/null
            1,4,7,10,13,17,20,23,26,29,32,35,38,41,44,47,50,53,56,59 * * * * /export/home/dba/sh-scripts/dbserver-monitor.sh > /dev/null
            0 0 1,16 * * /usr/bin/rm /var/mail/dba > /dev/null
            

             

            WHY??? Because it's HIS BLOODY CRONFILE... GET IT?

             

            OK? COMMON CRONFILE! SO WE DON'T HAVE THAT HERE!

             

            So if we don't have common a cronfile, for lack of a better way to describe it, and we each have our own how can I or anyone share their cronfile so every one can use it and edit it so we don't have x number of cronfiles  all running jobs and no one can see who's is running what.

             

            I work in the data ware house field mostly so yes, the majority of shops I've been in have used a COMMON cronfile to schedule load jobs ( LOAD JOBS! UH OH! ANOTHER LOOSE TERM! QUICK BLOODY GOOGLE IT! NO TIME TO FIGURE OUT WHAT I MEAN FROM THE CONTEXT. IT WOULD TAKE A TEAM OF SWEDISH SCIENTISTS WORKING AROUND THE CLOCK IN 8 HOUR SHIFTS TO FIGURE OUT WHAT I MEAN AND WE JUST DON'T HAVE THE MONEY!!!)

             

            Unreal dude. I'm not even going to go into the "In Business since 1981" phrase.

            • 3. Re: How can I share my cron file to the rest of my group?
              Avi Miller-Oracle

              Mod note: both of you stop the personal attacks, please?

               

              Also, there is always a root cron, but you need to be root to access it. "sudo crontab -e" is what you're after. Or "crontab -u <user> -e" will edit a specific user's cron. Alternatively, you can place files in the /etc/cron.d or /etc/cron.<period> directories to be picked up by anacron.

              • 4. Re: How can I share my cron file to the rest of my group?
                Dude!

                Cron runs either as root or some other user. For root you have /etc/crontab and /etc/anacron. Machine maintenance tasks are typically done by anacron because unlike cron it takes into account that a machine might have been turned off.

                 

                The name of the crontab file is the same as the username, e.g. /var/spool/cron/oracle. I think sharing the crontab file is the wrong approach and although perhaps technically possible, I think it will be to cumbersome and asking for unnecessary trouble.

                 

                I suggest the following:

                 

                Share Cron Between Users in Oracle Linux

                • 5. Re: How can I share my cron file to the rest of my group?
                  EdStevens

                  Tater_Salad wrote:

                   

                  Let me explain most shops: You go into a company that uses cron to schedule things in Linux (Stop me if I'm going too fast for you).

                   

                  You type crontab -e to add your cron file command and schedule settings. A cron file opens up like Magic ( Magic Dude! Magic!)

                   

                  You see other cron jobs in there added by other users. ( Is "other shops" starting to make sense yet?).

                   

                  But you see they can type "crontab -e" and get the SAME BLOODY FILE!!! WHY?!? BECAUSE ROOT ( Sorry "root") CREATED IT!!!

                   

                  MOST SHOPS!!! Now you see HERE( this shop) I type "crontab -e" and I get an empty cron file when my co-worker types in "crontab -e" and gets...

                  1. #------------------------------------------------------------------
                  2. #Generalsection:
                  3. #
                  4. #1.RemoveOracletracefilesandauditfiles
                  5. #2.MonitorDBserverandlistenereveryminute
                  6. #3.removecrontaboutputfiles
                  7. #4.checkforexporterrors
                  8. #
                  9. #------------------------------------------------------------------
                  10. #
                  11. 209***/export/home/dba/sh-scripts/RmOracleTraceFiles.sh>/dev/null
                  12. 1,4,7,10,13,17,20,23,26,29,32,35,38,41,44,47,50,53,56,59****/export/home/dba/sh-scripts/dbserver-monitor.sh>/dev/null
                  13. 001,16**/usr/bin/rm/var/mail/dba>/dev/null

                   

                  WHY??? Because it's HIS BLOODY CRONFILE... GET IT?

                   

                  OK? COMMON CRONFILE! SO WE DON'T HAVE THAT HERE!

                   

                  So if we don't have common a cronfile, for lack of a better way to describe it, and we each have our own how can I or anyone share their cronfile so every one can use it and edit it so we don't have x number of cronfiles all running jobs and no one can see who's is running what.

                   

                  I work in the data ware house field mostly so yes, the majority of shops I've been in have used a COMMON cronfile to schedule load jobs ( LOAD JOBS! UH OH! ANOTHER LOOSE TERM! QUICK BLOODY GOOGLE IT! NO TIME TO FIGURE OUT WHAT I MEAN FROM THE CONTEXT. IT WOULD TAKE A TEAM OF SWEDISH SCIENTISTS WORKING AROUND THE CLOCK IN 8 HOUR SHIFTS TO FIGURE OUT WHAT I MEAN AND WE JUST DON'T HAVE THE MONEY!!!)

                   

                  Unreal dude. I'm not even going to go into the "In Business since 1981" phrase.

                  I obviously hit some kind of sore spot here. I'm not sure why or how, but please accept my apology.

                   

                  I tried to make it clear that I wasn't certain that there was no way to have a "shared" crontab file.  Just that I had never seen one.  My bigger exception was to your assertion that "most" shops did it your way.  In reality, unless someone has been working for a long time as a short-term consultant, allowing them to see a representative sampling, one cannot really say what "most" shops do.  And yes, that applies to my observation as well.

                  • 6. Re: How can I share my cron file to the rest of my group?
                    Dude!

                    For what it' worth, I agree with your assertion. I too have never heard or seen an implementation of a common or shared crontab. I did not invent cron, but to my understanding, that's not a feature that cron provides -- and to make this happen by setting file permissions and what else, is the wrong concept, as I explained.

                     

                    I don't think your response was unreasonable, however, the response you received is not. Writing in uppercase is the equivalent of shouting, and for example, replying "WHY??? Because it's HIS BLOODY CRONFILE... GET IT?" is rude. People, who devote their free time here on a regular and voluntary basis deserve more respect.

                     

                    I wouldn't be surprised if Avi Miller will be considering to lock the thread to avoid further possible escalation. From a technical perspective, I would say the question has been resolved and answered.

                    • 7. Re: How can I share my cron file to the rest of my group?
                      Tater_Salad

                      Dude! I may have over stepped my answer however it was a simple question and Ed Stevens first four sentences in his replies were arrogant and collectively a put down.

                       

                      I think I'm just tired of logging in here and asking a question only to get a response that's not an answer but an attempt to display that persons prows in this field (if they're actually at that level).

                       

                      Why bother if you're not going to help? His then reply was just him covering his a$$. He still didn't offer any help. You answered the question directly logically and succinctly.

                       

                      That's all I wanted. If it's obvious I'm not strong in this area then that's why I'm logging in. If I didn't form the question right, well again, it's because the area I'm talking about isn't a strong point.

                       

                      Seriously look at some of these folks that pull this stuff and track their responses over time. You'll see they answer 'to be heard' not to help. So they can say , "Yes I was on that thread as well."

                       

                      If you're going to devote your free time to 'help' well then 'help'. Otherwise don't waste your free time.

                       

                      I notice the Oracle forums are rampant with this kind of behavior. I've been a forum member using different logins as I go from client to client for the last 24 years.

                       

                      (Yes to Ed Stevens point I've been a short term consultant at well over 35 clients. So I've seen a large sample of environments. Maybe I didn't get the term right for "shared cron file" but you did figure out what I meant. "the root cron file")

                       

                      I've chimed in on questions and have offered help. If I've ever not understood the question or thought it was poorly asked, I've moved on. I've never replied to a question in my life and said "You're wrong! I know more! And aren't you a foolish person for all of it? Hey look everybody! This clown doesn't know what he's talking about. What's HE doing asking a questions on Oracle forum?"

                       

                      Finally does anyone out there honestly think answers like the one given in this post and the other post I'm referring to EVER make the asking person go "Gee. He;s right. I shall rethink my ways" Does that type of behavior ever get the asking client to get to their answer faster? All it does is cause the asking client who's probably had a long day of dealing with other crap from other people to give the fed up with it all response I gave. Adding to the irony are the respondents responding to the rebuttal that "this is a professional sight where members should act professionally" referring to the rebuttal on the negative response while ignoring the negative response itself. And therein lies the hypocrisy of the business world in general.

                       

                      So in the end please understand my standpoint as well. Look past the harsh language and see the overall intent. You've helped me before I respect your knowledge and hope to keep a line of communication going. But also note if I feel I'm unfairly treated I will speak up about it and my responses are very seldom without merit. Thanks again for your time and your ongoing help and please have a nice and productive day.

                       

                      -Tater

                      • 8. Re: How can I share my cron file to the rest of my group?
                        Dude!

                        Let's keep in mind that people here are not publishing experts. There is usually a difference between what people write and what people see written between the lines. You may read arrogance between the lines; I do not. I have concluded that it is always better to ignore personality guessing or nuances that are perhaps lack of communication skills, and instead focus on what information a discussion can provide. There used to a wise sentence in the old forum etiquette that an unfortunate post is better ignored than flamed, or even better, explain how to create a better post - or similar if I recall correctly.

                         

                        What exactly have you accomplish with your response? The way I see, nothing worth mentioning. I initially found the problem you are describing interesting, but I did not see your response after the fact I posted - I may have thought twice considering.

                        • 9. Re: How can I share my cron file to the rest of my group?
                          Tater_Salad

                          Like I had said Dude! it was just an unfortunate, fed up ,vent...

                           

                          What did I accomplish? Well I felt a heck of a lot better afterwards...