The Welkin Suite Forum

Deploy schedulable class



Deploy schedulable class

  • Please log in to reply

#1

jozuk

    Posted 09 Mar 2016

    Hi,


    Currently when I try to deploy class that is affected by scheduled job, I get 'Error 1 This schedulable class has jobs pending or in progress'. In SF 'Allow deployments of components when corresponding Apex jobs are pending or in progress' is set to true.

    It works perfectly in eclipse, and that's the only reason i still keep eclipse on my computer. 






    10 replies to this topic

    #2

    kate.dulko

      Posted 09 Mar 2016

      He Jozuk,


      Thank you for your question.


      We are going to investigate this issue.

      It will be implemented in one of our next sprints, probably in a month.


      I'll keep you updated when you can delete Eclipse :)


      Regards,

      Kate


      Kate Dulko
      Customer Relations

      The Welkin Suite

      twitter: @KateDulko
      skype id: d_katerina
      e-mail: kate.dulko@welkinsuite.com

       

        


      #3

      fprevost

        Posted 09 Mar 2016

        Hello,


        I've got the same problem with the impossibility to deploy a scheduled class. 

        To solve this problem I use proxy classes so now I can change implementation classes and publish them when I want.


        1st class (an interface)


        public interface IScheduleDispatched {
          void executeTask(SchedulableContext sc);
        }
         
        proxy class whiich will be scheduled (and never changed)
         
        global class PRG_scheduledAnaelProxy Implements System.Schedulable {
          global void execute(SchedulableContext sc) {
            try {
               Type targetType = Type.forName('PRG_scheduledAnael');
               if (targetType != null) {
                 IScheduleDispatched instance = (IScheduleDispatched) targetType.NewInstance();
                 instance.executeTask(sc);
               }
            } catch (Exception ex) {
               System.debug('Exception during execution of scheduled task "PRG_scheduledAnael" : ' + ex );
            }
          }
        }

        The implementation class (and you can use static method "RunTask" for a direct call :-)


        global class PRG_scheduledAnael implements IScheduleDispatched {
           public static void DoTask() {
             // implementation/call goes here
           }
        
           global void executeTask(SchedulableContext SC) { 
              DoTask();
           }
        }


        #4

        jozuk

          Posted 09 Mar 2016

          Thanks fprevost,


          Looks like a good solution .

          Unfortunately is is not applicable in my project.



          #5

          roman.hnativ.com

            Posted 10 Jan 2017

            Hi Kate,


            This issue is active once again.

            My version: 1.2.23.4.

            See attachment.


            Regards,

            Roman



            Attached Files


            #6

            kate.dulko

              Posted 10 Jan 2017

              Hi Roman,


              Thank you for your post.

              May I please clarify with you if you have tried the workaround that is described in one of the previous posts?

              Additional information related to this issue you can find here.


              Please let us know about your results after using these ways to solve the issue.

              Our developers will investigate this deeper.


              Thank you,

              Kate



              Kate Dulko
              Customer Relations

              The Welkin Suite

              twitter: @KateDulko
              skype id: d_katerina
              e-mail: kate.dulko@welkinsuite.com

               

                


              #7

              roman.hnativ.com

                Posted 10 Jan 2017

                Hi Kate,


                Thanks for quick reply.

                Solution proposed in one of previous post is not suitable for me since i'm dealing with legacy code.

                As for article you are sugessting - answer is similar, it's not applicable since 'You will need to reschedule all jobs manually after running this', and there are many of those.


                I'm using welkin since early 2016. On same project and same classes it was working perfectly till last update of welkinsuite.


                There is one workaround i'm currently using - Eclipse IDE, but it's not a way i would like to deal with it.


                Regards,

                Roman



                #8

                kate.dulko

                  Posted 10 Jan 2017

                  Hi again Roman,


                  Thank you for your response with all the details.


                  We didn't change the mechanism of the deployment process in the latest version of TWS, but we will check what could affect this process.

                  May I please clarify with you if your Salesforce Organization hasn't been updated to Salesforce Spring'17?


                  Thank you,

                  Kate




                  Kate Dulko
                  Customer Relations

                  The Welkin Suite

                  twitter: @KateDulko
                  skype id: d_katerina
                  e-mail: kate.dulko@welkinsuite.com

                   

                    


                  #9

                  roman.hnativ.com

                    Posted 11 Jan 2017

                    Hi Kate,


                    Yes, our org is updated to spring'17. It happened same weekend welking got updated on my computer.


                    Roman



                    #10

                    vlgubanovich

                      Posted 11 Jan 2017

                      Hi Roman,


                      Thank you for additional details about this issue.

                      Currently, we are not able to reproduce this situation on our Winter orgs. This why we will work on testing of this issue on both Winter and Spring orgs, however, our current assumption is some small undocumented changed in the Spring'17 release that has changed the behavior.


                      We will keep you updated about our progress on this issue investigation.


                      Thank you,

                      Vladimir


                      Vladimir Gubanovich
                      Head of Product
                       
                      The Welkin Suite
                      skype id: vladimir.gubanovich
                      e-mail: vladimir.gubanovich@welkinsuite.com


                      #11

                      roman.hnativ.com

                        Posted 13 Jan 2017

                        Hi Vladimir,


                        Thank you. Will be looking forward for updates.


                        Regards,

                        Roman






                        Boost Your Productivity. Get Started Today

                        Try Free Trial