Solved

Schedule Question: I have a Process button on Custom Process Form and it works, but scheduler won't

  • 7 December 2022
  • 6 replies
  • 167 views

Userlevel 3
Badge

The schedule seems to not fire. 

I can run the process button and it works on the Process Form but the Schedule won’t run. The Process Button calls a button on a graph.   

The Scheduler is Initialized. 

 

I keep wondering if this is related: The method behind the button on the graph is not static.  

I know the button method on the Process Form has to be static, does anything called in the chain have to be static?  Just grabbing  at straws because it doesn’t make sense its not running on a schedule 

icon

Best answer by Naveen Boga 8 December 2022, 11:59

View original

6 replies

Userlevel 7
Badge +17

Hi @edwardmcgovern97  Can you please share the scheduler configuration screenshots?

Userlevel 3
Badge

I have further refined what is going on.  Its not that the schedule isn’t running, it is once I took into account

  1. the default time zone for a schedule is Pacific Time
  2. Schedules default to only run Once, if you are just changing the time to test of an existing schedule.  I was just changing time over and over to run again for a run Once  a day schedule.  But the schedule was checked to run only once a day so never ran after the first time...
  3. If you are changing the schedule to another time during testing make sure the next run date time changes to what you want (sometimes it doesn’t change)

Either way I know for a fact it is running, but the code is not executing.  

My Custom button does this: 

For the current record it does a bunch of web service calls, grabs data from a generic query, and sends that data to the web services. Then it finally saves some data to a table to record the result. 

This works fine when I select the item to execute and clck process on the Processing Form.  

It does not do any of the above when I schedule. The schedule is running but not getting any results in my table, never calls the web services and never pulls the data.  Its like the button is never clicked. 

The button is not a static method. Not sure if that matters I know the button’s method on the process form has to be static, thats why I mentioned the static thing. 

 

Userlevel 3
Badge

Just incase the schedule does reveal something I pasted it above.  But it is running, but it never executes the button code...Run Template is the Process Button btw

Userlevel 7
Badge +17

Hi, @edwardmcgovern97  As you are using the “Run Template”  as the PROCESS button, this button will not be invoked by the scheduler.

PROCESS button will work only when we select the records in the grid and click on the process then the records will be processed.

We should use the PROCESS ALL button to process the records by the scheduler.  Can you please check once.

 

 

Userlevel 3
Badge

I renamed the Process button to Run Template, so technically that is the Process button (on the process form). 

templates.SetProcessCaption("Run Template");

And this works  for on the Process screen.  I can select an item or items and click Run Template and it all works fine.  Thanks for the suggestion.

I have narrowed it down now even more, the issue is not with every line on the process form. Its only one so it must be data related, not the way it was coded or what is missing. 

I can schedule other lines, it was just one I had problems with.  

Hard to debug a scheduled process…

Thanks for the input though

Userlevel 3
Badge

Hey Naveen, 

After more testing I was realizing that when I changed the filter on the schedule to the “working” records, the schedule flipped to the Process All.  

So it was as you were saying only working on scheduling when Process All was used.  I just didn’t realize it.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved