Find code and diagrams at:

Cron Jobs are automated tasks that you can create in Linux to do such things as delete cache files or run antivirus scans. You simply set when you want the task to run and then type the full command with options.

Notes:

Each user has their own crontab file including root.
Cron Jobs will have the permissions of the user they are associated with
If you accidentally simply Type crontab with no options to exit Type – Control x c together
Crontab Editing and Viewing

crontab -e – Edit crontab file for logged in user
sudo crontab -e – Edit crontab file for root
rm ~/.selected_editor – Resets default crontab editor option
crontab -l – Allows you to view crontab file for logged in user
crontab -u username -l – Allows you to view crontab file for other user
Crontab Scheduling

Format = Minute Hour Day Month DayofWeek Command
* * * * * touch /home/bob/cronTestFile = Will touch cronTestFile every minute
00 01 * * * touch /home/bob/cronTestFile = Will touch cronTestFile at 1am every morning
– Explains scheduling and has interactive tool

Nguồn: https://codeigniterbrasil.com

Xem thêm bài viết khác: https://codeigniterbrasil.com/lap-trinh-linux/

18 Comments

Neeraj Shamdev Lalu

May 1, 2020

Eli is honestly one of the very few teachers/tutors that can keep you engaged no matter how long or short his videos are this is the mark of naturally gifted teacher .

Reply

Shininh Chinku

May 1, 2020

Can a single job run multiple times in a single day ?

Reply

khatereh hejazi

May 1, 2020

Dear Eli take a little zoom in please

Reply

Mate Baucic

May 1, 2020

You deserve more likes

Reply

Blue Dream

May 1, 2020

Eli, fantastic basic tutorial on Cron Jobs! Thanks a lot!

Reply

Ass Whole

May 1, 2020

Eli acts so normal on this channel

Reply

Doug

May 1, 2020

"If you hit enter, you'll get into this… What is this? This is this…"

Reply

RouseTek Apps

May 1, 2020

What version of linux have you seen mostly used in the workforce e.g. Redhat etc.?

Reply

Matt Stone

May 1, 2020

I like cheese.

Reply

Dr. Javier Jubierre

May 1, 2020

Love this new format for your videos. Keep them flowing!!

Reply

Animesh Singh Chouhan

May 1, 2020

Select an editor. To change later, run 'select-editor'.
1. /bin/nano <—- easiest
2. /usr/bin/vim.tiny
3. /usr/bin/code
4. /bin/ed

Reply

-

May 1, 2020

Like you said, it's this sort of user-friendliness that has gift-wrapped the user space for Microsoft and Apple. ¬_¬

Reply

Noah Hounshel

May 1, 2020

ctrl + c is all that's needed to exit out of the command "crontab" without any issues. This is the "common" shortcut for non-interactive programs to exit out of them. (
This works with everything from "apt" to "yes". There's no "ctrl+x+c"

Reply

o k

May 1, 2020

So m1 help me w my databass

Reply

dark whisperer

May 1, 2020

I really really really really really.. hope you will come with a better software to schedule tasks, with a much better name and better features 😀

Reply

OtterGauze

May 1, 2020

Honestly, I love Linux, and I wish I could use it more often but my work flow doesn't really allow for it. But it feels like the command names were made by someone who likes using super niche words to sound hipster.

Cronjob, that doesn't sound like a tool to schedule commands, it sounds like what you'd call getting a blowjob from corn on the cob.

Reply

PicyPoe

May 1, 2020

Thank you 🙏

Reply

JayRoow

May 1, 2020

I am getting a big data certificate from my local community college where we are learning python , simple stats , Big Data Integration and Processing, Big Data Modeling and Analysis. I am a cs major with some knowledge of java and c++ once I finish the cert I’m trying to see if I will be able to get a data analyst job what do you think would be good for me or my next step? I want to get into the industry while in school to get some work experience since my part time job is draining and isn’t related to my degree thank you so much !

Reply

Leave a Reply