Skip to content

Re-run batch script daily

Featured Replies

I have a script that I need to run daily (via Package/Program deployment). Not a problem, set it to always re-run & it does it fine at scheduled times.

But on weekly basis the script changes (version number inside). I can re-distribute it & add another schedule, but the new .bat never makes to the client from DP

Client keeps re-running the existing (by now old) local cache .bat

Only way I found is to re-create whole Package/Program & deploy it again. But I find it rather drastic.

Anybody has a better idea?

Seb

  • Author

Ofcourse DP is updated!

That what re-distribute action does

Yet on client the .cmd is NOT downloaded new

Seb

I know that you don't like the answer but in a nutshell, it is right. Think about it. 

How does a CM client know that there are new source files? At a high level, the processes is a follows.

  1. Source Files are updated.
  2. CM is told to update source files
  3. CM creates the package for replication.
  4. CM update the source version within db.
  5. CM create a policy stating there is a new version for package x.
  6. DP are told to update source files
  7. DP actually get new source files. 
  8. CM update the source version within db.
  9. Client contact MP and for all policies
  10. All policies are evaluated
  11. Client run package x, notices that it's version does not match package x
  12. Client downloads new source files
  13. Client run package x.

If client do not see the latest version of the package then something is wrong in step 1-4. Once step 5 happens, all clients will wait for the newest source files to be on their DP once the policies are evaluated.

 

 

 

 

  • Author

I understand, how it is supposed to work.

But if I update the DP & then run it on a PC that never had it previously deployed then correct version is downloaded & executed (hence the version in DP is correct)

But if I simply expect it to re-run on PC that had it previously deployed (and did run on it as part of schedule), then new .cmd is simply not downloaded & cached one is executed.

That is what I see

Are you seeing the new policies being download? For example, if the computer is off the network, the computer will re-run with the old version, why because as far as it is concerned those policies are still current. 

  • 1 month later...
  • Author

I did test it again (and kept checking) and it did work in the end as expected. No idea what it was when it was not working, but works now, so I am happy!, thanks

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.