How to set Crontab job in Macbook

I will show you the simplest way that how to set crontab job in Macbook. Let’s see here.

How to use?

Go to terminal, and write following line, then hit enter.

env EDITOR=nano crontab -e

Now you are able to write your cron instructions. Just add whatever you want. I am showing you one example-

* * * * *  cd ~/my/backup/folder && ./

How to use URL?

Well, if you need to use url in cron job, here are the ways-

Way 1:

Use curl to fetch the data.

* * * * * curl http://localhost/your/url
Way 2:

You can use wget for that.

* * * * * wget http://localhost/your/url

Now save your crontab.

How to see the list of the Cron job?

Just write following line of code in terminal and hit enter.

crontab -l

Laravel Carbon Display Local Dates and Time

If you use laravel and want to make it localized your date time, I think Laravel Carbon Display Local Dates and Time will help you to achieve.

Now based on your requirement, you can assign any place name that you want.