MacBook Pro tries to shutdown every X hours My Macbook Pro is trying to shutdown itself every X amount of hours, is there a way to check in the logs what process is triggering the shutdown process?

I can see the following in the logs, but not much else:

Mar 28 11:10:09 cleanCaptureDirectories /Library/Logs/CoreCapture
Mar 28 11:10:09 numberOfDirArrayEntriesMax: 50, numberOfDirArrayEntries 0
Mar 28 11:10:09 cleanCaptureDirectories /Library/Logs/CrashReporter/CoreCapture
Mar 28 11:10:09 numberOfDirArrayEntriesMax: 50, numberOfDirArrayEntries 50
Mar 28 11:10:09 cleanCaptureDirectories /Library/Logs/CoreCapture
Mar 28 11:10:09 numberOfDirArrayEntriesMax: 50, numberOfDirArrayEntries 0
Mar 28 11:10:09 pruneDirectoryNDaysRead cap 7
Mar 28 11:10:09 CCDaemon::shutdown is fired
Mar 28 11:10:09 cleanCaptureDirectories /Library/Logs/CrashReporter/CoreCapture
Mar 28 11:10:09 numberOfDirArrayEntriesMax: 50, numberOfDirArrayEntries 50
Mar 28 11:10:09 cleanCaptureDirectories /Library/Logs/CoreCapture
Mar 28 11:10:09 numberOfDirArrayEntriesMax: 50, numberOfDirArrayEntries 0
Mar 28 11:10:09 cleanCaptureDirectories /Library/Logs/CrashReporter/CoreCapture
Mar 28 11:10:09 numberOfDirArrayEntriesMax: 50, numberOfDirArrayEntries 50
Mar 28 11:10:09 cleanCaptureDirectories /Library/Logs/CoreCapture
Mar 28 11:10:09 numberOfDirArrayEntriesMax: 50, numberOfDirArrayEntries 0
Mar 28 11:10:09 cleanCaptureDirectories /Library/Logs/CrashReporter/CoreCapture
Mar 28 11:10:09 numberOfDirArrayEntriesMax: 50, numberOfDirArrayEntries 50
Mar 28 11:10:09 cleanCaptureDirectories /Library/Logs/CoreCapture
Mar 28 11:10:09 numberOfDirArrayEntriesMax: 50, numberOfDirArrayEntries 0
Mar 28 11:10:09 cleanCaptureDirectories /Library/Logs/CrashReporter/CoreCapture
Mar 28 11:10:09 numberOfDirArrayEntriesMax: 50, numberOfDirArrayEntries 50
Mar 28 11:10:09 cleanCaptureDirectories /Library/Logs/CoreCapture
Mar 28 11:10:09 numberOfDirArrayEntriesMax: 50, numberOfDirArrayEntries 0
Mar 28 11:10:09 cleanCaptureDirectories /Library/Logs/CrashReporter/CoreCapture
Mar 28 11:10:09 numberOfDirArrayEntriesMax: 50, numberOfDirArrayEntries 50
Mar 28 11:10:09 cleanCaptureDirectories /Library/Logs/CoreCapture
Mar 28 11:10:09 numberOfDirArrayEntriesMax: 50, numberOfDirArrayEntries 0
Mar 28 11:10:09 cleanCaptureDirectories /Library/Logs/CrashReporter/CoreCapture
Mar 28 11:10:09 numberOfDirArrayEntriesMax: 50, numberOfDirArrayEntries 50
Mar 28 11:10:09 cleanCaptureDirectories /Library/Logs/CoreCapture
Mar 28 11:10:09 numberOfDirArrayEntriesMax: 50, numberOfDirArrayEntries 0
Mar 28 11:10:09 CCProfileMonitor::freeResources Entered
Mar 28 11:10:09 CCProfileMonitor::freeResources done
Mar 28 11:10:09 CCDataTap::profileRemoved, Owner: com.apple.iokit.IO80211Family, Name: AssociationEventHistory
Mar 28 11:10:09 CCLogTap::profileRemoved, Owner: com.apple.iokit.IO80211Family, Name: IO80211AWDLPeerManager
Mar 28 11:10:09 CCLogTap::profileRemoved, Owner: com.apple.driver.AirPort.Brcm4360.0, Name: DriverLogs
Mar 28 11:10:09 CCLogTap::profileRemoved, Owner: com.apple.iokit.IO80211Family, Name: OneStats
Mar 28 11:10:09 CCIOReporterFormatter::refreshSubscriptionsFromStreamRegistry clearing out any previous subscriptions
Mar 28 11:10:09 CCIOReporterFormatter::addRegistryChildToChannelDictionary streams 24
Mar 28 11:10:09 CCDataTap::profileRemoved, Owner: com.apple.driver.AirPort.Brcm4360.0, Name: StateSnapshots
Mar 28 11:10:09 CCLogTap::profileRemoved, Owner: com.apple.iokit.IO80211Family, Name: ControlPath


I've seen other answers but they are for Macs that power off completely, mine is not shutting down cause the iTerm popup is stopping it. But then all other apps are closed.
Check if a shut down schedule is set in System Preferences → Energy Saver → Schedule.