aaPanel_Kern After adding full path this is an error I got in cronjob log.
By command : which pm2 , then I got full path of pm2 and added it in cronjob.
source /root/.profile
/www/server/nvm/versions/node/v16.13.0/bin/pm2 -u www restart 2
Cronjob log:
----------------------------------------------------------------------------
/usr/bin/env: ‘node’: No such file or directory
----------------------------------------------------------------------------
★[2022-07-19 08:07:05] Successful
----------------------------------------------------------------------------