Power Serach, Template Data Feed, Cron Jobs and Plesk

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Geographicus
    Mivite

    • Feb 2008
    • 460

    #1

    Power Serach, Template Data Feed, Cron Jobs and Plesk

    My server company recently upgraded to the plesk control panel. THe panel seems great but all of the cron jobs that I previously created seem not to run under the plesk scheduling system.

    These crons (below) which run my Powersearch and Template Data Feed modules were working fine before the plesk upgrad, but now simply do not run. I am working with my server company to isolate the problem, but I wonder if anyone else had these problems and has identified a solution?

    wget -q --post-data='Screen=SUTL&Action=SUTL&Store_Code=AntiqueMa ps&Module_Code=exprodf&UserName=xxx&Password=xxx&P rovision=yes&Submit=Login&ExProdF_report=11&includ e_status=A&ExProdF_Custom_Fields=1&ExProdF_UI=modu les/ui/mmui.mvc' --no-check-certificate -O - 'https://geographicus.cybrhost.com/mm5/admin.mvc' > /dev/null

    wget -q --post-data='Screen=SUTL&Action=SUTL&Store_Code=AntiqueMa ps&Module_Code=powrsrch&UserName=xxx&Password=xxx& Provision=yes&Submit=Login&powrsrch_rebuild=777777 7&powrsrch_fulltext=name,descrip' --no-check-certificate -O - 'http://www.geographicus.com/mm5/admin.mvc' > /dev/null

    Kevin
    __________________________
    GEOGRAPHIUCS ANTIQUE MAPS
    923 Putnam Ave
    Brooklyn,NY 11221
    TEL: 646-320-8650
    www.GEOGRAPHICUS.com
  • Geographicus
    Mivite

    • Feb 2008
    • 460

    #2
    Re: Power Serach, Template Data Feed, Cron Jobs and Plesk

    Quick update. When I run the crons I am getting an error that reads:

    -: wget: command not found


    Kevin
    __________________________
    GEOGRAPHIUCS ANTIQUE MAPS
    923 Putnam Ave
    Brooklyn,NY 11221
    TEL: 646-320-8650
    www.GEOGRAPHICUS.com

    Comment

    • titus
      Developer Partner

      • Aug 2010
      • 118

      #3
      Re: Power Serach, Template Data Feed, Cron Jobs and Plesk

      Yeah, that's what I thought. It's an environment issue. The path isn't set properly. Talk to your host about fixing that. You should be able to get that via /usr/bin.
      PCINET, LLC

      Miva Merchant Design, Development, Integration & Support
      We built the most Miva Merchant stores!
      Miva shopping cart design & integration service and our Portfolio!

      e-mail: [email protected]
      web: www.pcinet.com

      "We who cut mere stones must always be envisioning cathedrals."
      Quarry Worker's Creed

      Comment

      • ILoveHostasaurus
        Mega Mivite










        • Mar 2006
        • 4998

        #4
        Re: Power Serach, Template Data Feed, Cron Jobs and Plesk

        Not sure if what you posted is identical to the cron job, but the first job is invalid because it has a bunch of spaces in it like "Store_Code=AntiqueMa ps", etc. Andreas is correct that wget is typically /usr/bin/wget so you could try changing the job to that and see if that resolves the issue. If the new version of Plesk is 10.3 there is also a bug with regard to cron job that may prevent it from working even if the path is correct.
        Last edited by ILoveHostasaurus; 10-05-11, 08:23 AM.
        David Hubbard
        CIO
        Miva
        [email protected]
        http://www.miva.com

        Comment

        • wcw
          Developer Partner

          • Mar 2006
          • 11329

          #5
          Re: Power Serach, Template Data Feed, Cron Jobs and Plesk

          Are there any other programs besides wget that can be used for this? The drawback of wget is it dies if you use javascript to refresh the screen. The screen is refreshed just before the miva global timeout when there are large databases. But wget won't allow the javascript to run. wget is ok for small and medium stores, but large stores can't take advantage of the cron wget automated method.
          Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
          Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
          Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
          Facebook http://www.facebook.com/EmporiumPlus
          Twitter http://twitter.com/emporiumplus

          Comment

          • ILoveHostasaurus
            Mega Mivite










            • Mar 2006
            • 4998

            #6
            Re: Power Serach, Template Data Feed, Cron Jobs and Plesk

            Originally posted by wcw View Post
            Are there any other programs besides wget that can be used for this? The drawback of wget is it dies if you use javascript to refresh the screen. The screen is refreshed just before the miva global timeout when there are large databases. But wget won't allow the javascript to run. wget is ok for small and medium stores, but large stores can't take advantage of the cron wget automated method.
            I'm not aware of any command line web request engine that will honor javascript refreshes or meta refreshes. Probably the only reliable way to accomplish a refresh of that nature would be for the module to output absolutely nothing when called in cron job mode and then issue an http header 301 redirect to the next screen when it nears the timeout; command line browsers do tend to honor redirects issued at the http level.
            David Hubbard
            CIO
            Miva
            [email protected]
            http://www.miva.com

            Comment

            • titus
              Developer Partner

              • Aug 2010
              • 118

              #7
              Re: Power Serach, Template Data Feed, Cron Jobs and Plesk

              As far as I know, most (all?) CLI based browsers don't run javascript. This may be able to be accomplished via some heavy integration with xvfb. But that could also be stretching it a bit. I'm not sure. I have some self-hosted monitoring systems that I have developed, which use xvfb to pull in the x-window basics so I can run browsers with Javascript in them, from a CRON. The only issue with this is that I've had to write proprietary browser plugins to accomplish the Javascript running.

              I highly doubt that hosting companies are going to go the extra mile to allow this. This would be something that would more than likely be a dedicated service from someone running a VPS.
              Last edited by titus; 10-05-11, 08:54 AM.
              PCINET, LLC

              Miva Merchant Design, Development, Integration & Support
              We built the most Miva Merchant stores!
              Miva shopping cart design & integration service and our Portfolio!

              e-mail: [email protected]
              web: www.pcinet.com

              "We who cut mere stones must always be envisioning cathedrals."
              Quarry Worker's Creed

              Comment

              • wcw
                Developer Partner

                • Mar 2006
                • 11329

                #8
                Re: Power Serach, Template Data Feed, Cron Jobs and Plesk

                Well that is an interesting solution. Now if I could just get some free time to work on that idea.
                Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
                Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
                Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
                Facebook http://www.facebook.com/EmporiumPlus
                Twitter http://twitter.com/emporiumplus

                Comment

                • wcw
                  Developer Partner

                  • Mar 2006
                  • 11329

                  #9
                  Re: Power Serach, Template Data Feed, Cron Jobs and Plesk

                  Originally posted by ILoveHostasaurus View Post
                  the module to output absolutely nothing when called in cron job mode and then issue an http header 301 redirect to the next screen when it nears the timeout
                  Therein lies the problem. The module runs in admin in the utilities section. While we have control of that screen, admin.mvc is inserting doctype and html tag at the beginning. Hence, it would have to be run either 1) as a standalone mivascript or 2) as a component in merchant.mvc. If the admin.mvc would have worked, it would have been a half hour project. Looks like it will be a bit more involved.
                  Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
                  Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
                  Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
                  Facebook http://www.facebook.com/EmporiumPlus
                  Twitter http://twitter.com/emporiumplus

                  Comment

                  • titus
                    Developer Partner

                    • Aug 2010
                    • 118

                    #10
                    Re: Power Serach, Template Data Feed, Cron Jobs and Plesk

                    Originally posted by wcw View Post
                    Therein lies the problem. The module runs in admin in the utilities section. While we have control of that screen, admin.mvc is inserting doctype and html tag at the beginning. Hence, it would have to be run either 1) as a standalone mivascript or 2) as a component in merchant.mvc. If the admin.mvc would have worked, it would have been a half hour project. Looks like it will be a bit more involved.
                    I'm not very well versed in Miva Module creation yet, but isn't there a way to capture the output in a buffer before it's sent to the browser? If it can't be done in Miva, then it should be possible to do via .htaccess

                    I've done that with .htaccess for inserting Google Analytics on a site with 15,000 HTML pages (no CMS.. all different markup) without changing any of the pages.

                    I think you should be able to do something similar in concept if Miva won't allow you to buffer output and manipulate it before it gets sent out.
                    PCINET, LLC

                    Miva Merchant Design, Development, Integration & Support
                    We built the most Miva Merchant stores!
                    Miva shopping cart design & integration service and our Portfolio!

                    e-mail: [email protected]
                    web: www.pcinet.com

                    "We who cut mere stones must always be envisioning cathedrals."
                    Quarry Worker's Creed

                    Comment

                    • Geographicus
                      Mivite

                      • Feb 2008
                      • 460

                      #11
                      Re: Power Serach, Template Data Feed, Cron Jobs and Plesk

                      Getting back to the original question. By adding the wget command I actually got the Power Search cron to run regularly. However, I cannot seem to get the template data feed cron to kick in.

                      Any ideas:

                      wget -q --post-data='Screen=SUTL&Action=SUTL&Store_Code=AntiqueMa ps&Module_Code=exprodf&UserName=xxx&Password=xxx&P rovision=yes&Submit=Login&ExProdF_report=11&includ e_status=A&ExProdF_Custom_Fields=1&ExProdF_UI=modu les/ui/mmui.mvc' --no-check-certificate -O - 'https://geographicus.cybrhost.com/mm5/admin.mvc' > /dev/null
                      __________________________
                      GEOGRAPHIUCS ANTIQUE MAPS
                      923 Putnam Ave
                      Brooklyn,NY 11221
                      TEL: 646-320-8650
                      www.GEOGRAPHICUS.com

                      Comment

                      • Geographicus
                        Mivite

                        • Feb 2008
                        • 460

                        #12
                        Re: Power Serach, Template Data Feed, Cron Jobs and Plesk

                        And no, there are no spaces in the actual code, thoses seem to be aded when I copy and past it here.

                        Also, I have tried removing the "s" form http but that doens't work either.
                        __________________________
                        GEOGRAPHIUCS ANTIQUE MAPS
                        923 Putnam Ave
                        Brooklyn,NY 11221
                        TEL: 646-320-8650
                        www.GEOGRAPHICUS.com

                        Comment

                        • titus
                          Developer Partner

                          • Aug 2010
                          • 118

                          #13
                          Re: Power Serach, Template Data Feed, Cron Jobs and Plesk

                          So, just to clarify -- you can run the wget command now without an error? For example, if you were to do:
                          Code:
                          wget http://example.com/index.html
                          would wget fetch the page?
                          PCINET, LLC

                          Miva Merchant Design, Development, Integration & Support
                          We built the most Miva Merchant stores!
                          Miva shopping cart design & integration service and our Portfolio!

                          e-mail: [email protected]
                          web: www.pcinet.com

                          "We who cut mere stones must always be envisioning cathedrals."
                          Quarry Worker's Creed

                          Comment

                          • titus
                            Developer Partner

                            • Aug 2010
                            • 118

                            #14
                            Re: Power Serach, Template Data Feed, Cron Jobs and Plesk

                            Maybe change it to this:

                            wget -q --post-data='Screen=SUTL&Action=SUTL&Store_Code=AntiqueMa ps&Module_Code=powrsrch&UserName=xxx&Password=xxx& Provision=yes&Submit=Login&powrsrch_rebuild=777777 7&powrsrch_fulltext=name,descrip' --no-check-certificate -O -'https://geographicus.cybrhost.com/mm5/admin.mvc' > /dev/null

                            I updated the http://www.geographicus.com/mm5/admin.mvc to match the https://geographicus.cybrhost.com/mm5/admin.mvc in the other job.

                            There was a redirect happening in the background. I don't know if that would have an affect, but always try and remove as many variables as possible when troubleshooting.
                            Last edited by titus; 10-05-11, 11:29 AM.
                            PCINET, LLC

                            Miva Merchant Design, Development, Integration & Support
                            We built the most Miva Merchant stores!
                            Miva shopping cart design & integration service and our Portfolio!

                            e-mail: [email protected]
                            web: www.pcinet.com

                            "We who cut mere stones must always be envisioning cathedrals."
                            Quarry Worker's Creed

                            Comment

                            • Geographicus
                              Mivite

                              • Feb 2008
                              • 460

                              #15
                              Re: Power Serach, Template Data Feed, Cron Jobs and Plesk

                              Yes, wget works - or at least it works with this code to run Power Search:

                              wget -q --post-data='Screen=SUTL&Action=SUTL&Store_Code=AntiqueMa ps&Module_Code=exprodf&UserName=xxx&Password=xxx&P rovision=yes&Submit=Login&ExProdF_report=11&includ e_status=A&ExProdF_Custom_Fields=1&ExProdF_UI=modu les/ui/mmui.mvc' --no-check-certificate -O - 'https://geographicus.cybrhost.com/mm5/admin.mvc' > /dev/null

                              however it does not work with this code which i was using to run Template Data Feed before Plesk:

                              wget -q --post-data='Screen=SUTL&Action=SUTL&Store_Code=AntiqueMa ps&Module_Code=exprodf&UserName=xxx&Password=xxx&P rovision=yes&Submit=Login&ExProdF_report=11&includ e_status=A&ExProdF_Custom_Fields=1&ExProdF_UI=modu les/ui/mmui.mvc' --no-check-certificate -O - 'https://geographicus.cybrhost.com/mm5/admin.mvc' > /dev/null

                              Kevin
                              __________________________
                              GEOGRAPHIUCS ANTIQUE MAPS
                              923 Putnam Ave
                              Brooklyn,NY 11221
                              TEL: 646-320-8650
                              www.GEOGRAPHICUS.com

                              Comment

                              Working...
                              X