Cron and hooks not working

Hello ,
I am using the Suite CRM version 7.8.16. I have migrated this version on new server with PHP version 7.2 and maria DB version 10.2. But on the new server, all the cron get failed and also some hooks does not work. I have added the after save hook on user module. This hook get called when I created the user from CRM this hook get executed correctly. But when I try to create user using rest API, this hook does not get executed. Please help me solve this.

Check your apache error log and suitecrm.log to identify the root cause.

Nothing wrong with log