ashcsi1322 Posted January 23, 2015 Share Posted January 23, 2015 Hi All,I am using the latest jrs php client. On selecting the following option:Run until a specified date:And entering the simpleEndDateI am writing the following code : $trigger = new SimpleTrigger(); $trigger->startType = $scheduleTrigger['startType']; if ($scheduleTrigger['startType'] == 2) { $trigger->startDate = $scheduleTrigger['startDate']; } $trigger->recurrenceInterval = $scheduleTrigger['interval']; $trigger->recurrenceIntervalUnit = $scheduleTrigger['intervalUnit']; if (!empty($scheduleTrigger['occurrenceCount'])) { $trigger->occurrenceCount = $scheduleTrigger['occurrenceCount']; } if (!empty($scheduleTrigger['endDate'])) { $trigger->endDate = $scheduleTrigger['endDate']; }Note, that I am not setting$trigger->occurrenceCount, when setting the trigger endDate. But it returns an unknown http status code and does not create a job. After adding the following line: if (!empty($scheduleTrigger['endDate'])) { $trigger->occurrenceCount = 1; $trigger->endDate = $scheduleTrigger['endDate']; }It creates a job successfully. But I think it is not intended to work like that. Could anyone let me know if I am missing something when using Schedule end date for simple trigger ?thanksashy Link to comment Share on other sites More sharing options...
newwaysys Posted August 13, 2018 Share Posted August 13, 2018 Thanks,I found this information helpful. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now