Auto-page a Cocos Creator PageView at a fixed interval with schedule, getPages, and scrollToPage while controlling duration, page bounds, and forward-reverse direction.
The direction reverses at the first and last pages, producing a back-and-forth carousel. The pageCount > 1 guard prevents an invalid index when the PageView has zero or one page. Unschedule the callback when automatic paging should stop.