HomeWiki
HomeWiki
  1. Utils
  • Back to home
  • 2. Connectivity
  • Introduction
  • Custom Script
  • Playground
  • Database Explorer
  • Log Stream
  • Direct Communication
  • Softone
    • Getting Started
  • Datapump
    • Getting Started
    • Crons
    • Legacy Windows Support
    • SDK
      • DB
        • _executeQuery
        • _executeStoreProcedure
        • _executeInsertQuery
        • _executeInsertQueriesInTransaction
      • Import
        • _productsImport
        • _categoriesImport
        • _brandsImport
        • _attributesImport
        • _attributeSetsImport
        • _unitsImport
        • _quantityImport
        • _customersImport
        • _contactsImport
        • _callsImport
        • _eventsImport
        • _tasksImport
        • _ordersImport
        • _usersImport
        • _customerSourceTagsImport
        • _productSourceTagsImport
      • Log
        • _logDebug
        • _logInfo
        • _logWarn
        • _logError
      • Web Requests
        • _httpGetJson
        • _httpPostJson
        • _httpPutJson
        • _httpDeleteJson
        • _httpPatchJson
      • Variables
        • _saveVariable
        • _getVariable
        • _deleteVariable
      • Blob
        • _blobConnect
        • _blobExists
        • _blobGet
        • _blobFind
      • Utils
        • _encodeBase64
        • _sleep
        • _getLastSyncDate
        • _updateLastSyncDate
        • _resetLastSyncDate
  1. Utils

_updateLastSyncDate

Documentation: _updateLastSyncDate Function#

The _updateLastSyncDate function updates the last synchronization timestamp for a specified job. This timestamp helps track the most recent synchronization for the job, ensuring that data processing and job scheduling are accurately managed.

Function Signature:#

Parameters:#

jobname:
Description: The name of the job for which the last synchronization date is being updated. This parameter identifies the specific job whose synchronization timestamp needs to be updated.
Type: string
Example:
lastSyncDate:
Description: The new synchronization timestamp to be set for the specified job. This timestamp should be formatted in "yyyy-MM-ddTHH:mm:ss.fff", representing the date and time of the last synchronization.
Type: string
Example:

Return Value:#

Returns:
The function does not return a value. It performs an update operation on the internal system state.

Function Workflow:#

1.
Receive Job Name and Date:
The function accepts the job name and the new synchronization date as input parameters.
2.
Validate Date Format:
Ensure that the lastSyncDate is in the correct format ("yyyy-MM-ddTHH:mm:ss.fff"). If not, the function may handle the error or reject the update.
3.
Update Synchronization Date:
The function updates the synchronization timestamp associated with the specified job in the system.
4.
Complete Operation:
The function completes the update operation without returning a value, ensuring that the job's last synchronization date is now current.

Example Usage:#

Important Considerations:#

Date Format:
Ensure that the lastSyncDate follows the "yyyy-MM-ddTHH:mm:ss.fff" format. Incorrect formatting may lead to errors or incorrect updates.
Job Name Accuracy:
Confirm that the jobname parameter accurately matches the job's identifier in the system to ensure the correct synchronization date is updated.
System Handling:
The function assumes the system or database where synchronization dates are stored handles the update correctly. Ensure that the system's implementation supports date updates as expected.
By using _updateLastSyncDate, you ensure that the synchronization timestamps for jobs are kept up-to-date, which is crucial for maintaining accurate scheduling and processing within the system.
Previous
_getLastSyncDate
Next
_resetLastSyncDate
Built with