-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid cast in scheduler job #12
Comments
Check in Forum admin settings that you have proper values in Queue settings. |
Email queue was disabled. I enabled it, then started "Cleanup Forum Email History" and "Send Forum Emails" schedulers manually, but exception still throwned. |
Yes, but check the setting on forum admin side, there is two values for these that need to have proper value. |
You mean these ones? Task History (days): 30 |
Yes |
I updated Queue settings w/o changing any values, then re-run forum schedulers - so far no exceptions in the log. Possible source in If Not Me.ScheduleHistoryItem.GetSetting("ForumTaskDeleteDays") Is Nothing Then
Dim DaysToDelete As Integer = 30 ' default value
If (Me.ScheduleHistoryItem.GetSetting("ForumTaskDeleteDays").Trim() <> "") Then
DaysToDelete = CInt(Me.ScheduleHistoryItem.GetSetting("ForumTaskDeleteDays"))
End If
' (1) else use default value
tasksDeleteDate = Date.Now.AddDays(-DaysToDelete)
End If
If Not Me.ScheduleHistoryItem.GetSetting("ForumEmailDeleteDays") Is Nothing Then
Dim DaysToDelete As Integer = 30 ' default value
If (Me.ScheduleHistoryItem.GetSetting("ForumEmailDeleteDays").Trim() <> "") Then
DaysToDelete = CInt(Me.ScheduleHistoryItem.GetSetting("ForumEmailDeleteDays"))
End If
' this line should not be here - compare with (1)
DaysToDelete = CInt(Me.ScheduleHistoryItem.GetSetting("ForumEmailDeleteDays"))
emailsDeleteDate = Date.Now.AddDays(-DaysToDelete)
End If |
Yes. I believe this setting is written only when you update something on those queue settings. Simply enabling it is not enough. |
The text was updated successfully, but these errors were encountered: