Scheduled Job - progressive processing / state management

How to most easily pass state information from one execution of a scheduled job to the next? If possible, I’d like to avoid database modifications. I had thought to write something to a specific file in the cache folder, but perhaps there is a simpler way. I only need to pass a single numeric value.


Hi anybritton

welcome to the forum!
It looks like no one has come to your aid.

Is the prime aim here to store the ‘single numeric value’ across a time gap (so hours later another scheduled tasks refers to it

  • more about needing a way to communicate that does NOT involve more usual mechanisms (saved in a log file…/database table / … ?

I guess if we knew more about the use case - more folks might have answers?

more about

1 Like

To clarify, I was needing to process a large set of records in batches, and needed a way to store the progress from one execution to the next. I suspect there’s probably a better way to set up a scheduled task to do this, but I did not have time to do the necessary research and testing.


So the next question - why are batches needed?

  • Maybe… because the system is locked /too slow for users -when they run?

You’ve probably tried to analyse WHY the job is so intense, and not found any way to reduce that.

What experiments have you done to do ‘batching’ another way:

  • maybe have 5 scheduled jobs - starting X minutes after each other
    1. for contacts starting A-F
    1. … starting G-K
      … etc
1 Like

more Qs… :slight_smile:

  • is this a nightly schedule job?
  • how long would it run before it would decide to stop and log ‘I got this far in the list: 887766’
1 Like

@DJUser - thanks for trying to help. I have a working system now based on storing a value in a cache file. I’m sure there’s a more elegant way but for now I’ll have to leave this and move on. Thanks again.

I think writing to the file system is a perfectly valid architecture choice for such a simple problem :slight_smile:

1 Like