Tạo example cronjob chạy trên Ubuntu 14.04

Tạo file test-cron.php dùng ghi ngày tháng vào file log

Cronjob ubuntu 14.04

File test.log

crontab-4

Mở file crontab

  • sudo crontab -u www-data -e

Cron job o Ubuntu 14.04

Thêm dòng config

Cron job o Ubuntu 14.04

Notes : * * * * * cronjob sẽ chạy từng phút.

Good luck ^_^

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s