cron job in cakephp 3 code example

Example: cronjob cakephp

crontab -l; -> get all current crontab in system
crontab -e -> execute cronjob

// Example
// At 12:00 evening run on time
0 12 * * * cd /Applications/XAMPP/htdocs/masterx && Console/cake LessonRemindNotification staging

// 1 minutes run one times
/1 * * * * cd /Applications/XAMPP/htdocs/masterx && Console/cake ExecutePush staging
/1 * * * * cd /Applications/XAMPP/htdocs/masterx && Console/cake UpdateClassStatus staging

// At 5:00 morning run one time
0 5 * * * cd /Applications/XAMPP/htdocs/masterx && Console/cake UpdateClassStatusAddStudentStampPaidTeacher staging

// At 1:00 morning run one time
0 1 * * * cd /Applications/XAMPP/htdocs/masterx && Console/cake UpdateStudentEnrolTimeoutStatus staging
0 1 * * * cd /Applications/XAMPP/htdocs/masterx && Console/cake UpdateTeacherPurchasePlanTimeoutStatus staging

Tags:

Php Example