Bash Scripting for Beginners: Complete Guide to Getting Started - Cron Jobs (Part 15)

preview_player
Показать описание
In the previous episode, you learned about the "at" command, which enables you to schedule a script to run later. In this video, we'll take a look at the same thing again - but it's not redundant. Actually, we'll learn more about Cron in this video, which is the tried and true method that Linux people use to handle scheduling jobs to run at a specific time in the future.

*🎓 BRAND NEW UDEMY COURSES AVAILABLE!*
Check out my new courses on Udemy and take your learning even further!

*🐧 SUPPORT LINUX LEARNING!*
_Note: Royalties and/or commission is earned from each of the above links_

*⏰ TIME CODES*
00:00 - Intro
00:32 - Using Fully Qualified Commands in your scripts (and why that's important)
06:02 - Introduction to Cron Jobs (crontab) in Linux
08:10 - Setting up a Cron Job via the crontab command
13:07 - How to edit the crontab of another user

OTHER BASH SCRIPTING SERIES EPISODES

*🌐 LEARN LINUX TV ON THE WEB*

*⚠️ DISCLAIMER*
Learn Linux TV provides technical content that will hopefully be helpful to you and teach you something new. However, this content is provided without any warranty (expressed or implied). Learn Linux TV is not responsible for any damages that may arise from any use of this content. Always make sure you have written permission before working with any infrastructure and that you are compliant with all company rules, change control procedures, and local laws.

#linux_tutorial #debian #bashscripting
Рекомендации по теме
Комментарии
Автор

I just wanted to share with you that I'm a big fan of your Bash Scripting series, Jay. I'm in my third year of college and have a good understanding of Linux and Vim. As a result, I've switched from using GitHub and VSCode to Vim as my editor. I write code in Vim and push it to Git using Ubuntu, which makes me feel like a real programmer. I aim to watch as many of your videos as possible because they provide a great source of knowledge for me. Before Linux, I was a bit lost about what I wanted to do, but now I am getting a natural hold of Linux. Considering this, I am considering starting a career as a system administrator. I also watched your video on career development and I'm following your advice to look out for the job descriptions and find common requirements. For example, Ansible, MySQL, AWS certification for sys admin, python, scala etc.

ognicklausmickaelson
Автор

valuable information at the beginning of the video, thanks.

hussamelshehawy
Автор

great cut, but I think that as for beginners, conditions like @[condition] should be covered too.

antonpanasiuk
Автор

Would love to see you convert crons (of course this has to do with shell scripts too) to systemd timers and services.

Chris-ipuv
Автор

Cron is incredibly widespread because it is included by default by most distributions and it is relatively easy to set up with a text file. That being said sometimes cron may not always be the best scheduling method, other comment pointed out that systemd timers are a thing and those are certainly useful if you want systemd functionality on your jobs, which leads people to compare one against the other.
I think that it is a "right tool for the right job" kind of situation and knowledge about both is useful to have.

AlbusRegis
Автор

why can't we run "cd" command inside a script.?

KrishnaNagiri
Автор

Hi, Thank you, the tutorials are really helpful. I just have a problem with the cronjob that does not run! the script works as it should and it writes out the output to the file. I included the "which command" echo path inside the script. and added the cronjob to both sudo and normal user, tried to save the file both in places where u should have sudo to be able to save and other places where should not. still not working! any tips?

MajedDalain
Автор

How do you run a command on reboot or startup?

fictitiousnightmares