Is it possible to implement the expiration date checking by script.
Please use the ExpirationDate Method of the License Object. This method returns the date in separate parts through references. In the C#, it will look like this:
license.ExpirationDate(out var year, out var month, out var day); // C#
More information you could find in this article from our Help: ExpirationDate Method of the License Object