Linux/Mac Tutorial: Cron Jobs – How to Schedule Commands with crontab

Video is ready, Click Here to View ×


In this Linux/Mac terminal tutorial, we will be learning about cron jobs and how to schedule commands with crontab. The will allow you to run commands on a repetitive schedule. So if you want to run a job daily, weekly, or at a certain time of day, this video will show you how you can get this set up. This helps a ton with system administration type of tasks and can automate a lot of work. Let’s get started.

The snippets from this video can be found…

32 Comments

  1. Hi Corey, really GREAT tutorials on your channel! I've binge-watched basically everything on it about git and terminal commands. Just a quick question: your dark chrome theme looks pretty appealing too and do you mind sharing the name of the theme? Thanks again for your awesome work!

  2. Hi Corey, excellent tutorial (as all of yours are). You have good pacing and your tutorials are easy to follow. I have a minor correction for you. In the example where you delete the temp folder every Friday, your example deletes at 5m. Not 5pm as you intended. Thanks again for all your order full tutorials.

  3. # ┌───────────── minute (0 – 59)
    # │ ┌───────────── hour (0 – 23)
    # │ │ ┌───────────── day of month (1 – 31)
    # │ │ │ ┌───────────── month (1 – 12)
    # │ │ │ │ ┌───────────── day of week (0 – 6) (Sunday to Saturday;
    # │ │ │ │ │ 7 is also Sunday on some systems)
    # │ │ │ │ │
    # │ │ │ │ │
    # * * * * * command_to_execute

    # Your welcome 😉

  4. nice tutorial!
    weird question tho – how did you map your google drive as a mount point/folder on your snippets?

    * Backup images to Google Drive every night at midnight
    > 0 0 * * * rsync -a ~/Pictures/ ~/Google Drive/Pictures/

    i can see dropbox as a native location but wondering whats the trick for google drive

  5. # _________ minute (0 – 59)
    # | _______ hour (0 – 23)
    # | | _____ day of month (1 – 31)
    # | | | ___ month (1 – 12)
    # | | | | _ day of week (0 – 6) (Sunday to Saturday;
    # | | | | | 7 is also Sunday on some systems)
    # | | | | |
    # | | | | |
    # | | | | |
    # * * * * * command_to_execute

    (looks nicer in terminal)

  6. Hey there Corey, do you know of any python book/resource where you are given projects to do (for practice for example) but aren't taken by the hand 100% of the way? I especially despised the "Python Crash Course – Hands on Project Based Approach"''s approach.. where everything is written out for you… . I wanted only some "tips" or hints on how to do some stuff, not code written out for me.. Thanks!

Leave a Reply

Your email address will not be published.


*