Hello will come back in this lesson we're going to learn how to share grueling tasks with cron jobs.
OK so what is wrong job.
It is in command line utility which is used to set up your tasks to be run at a particular date and
time.
So what are the benefits the benefits are like those you do need to go to a server and exactly the same
common or performing some tasks you just need to set those Come on.
Here with dustier to learn.
And those comments will be executed at a particular time like if you want to back up your important
files and folders.
You can set up that task to be run every day or in a month or in a week.
Or you can also set up the task to scanning was asking for viruses or that kind of thing.
So you can set up the cron job to secure your system by scanning it at regular interval.
OK.
And interval of a day or so of before actually performing the practical with cron jobs.
Let's see how it works.
So there is a syntax.
There are five stars in the cron job searching and here at the right side you need to set up the score
come on that you want to execute.
Let's see what each stat represents the first three presidents minutes.
You can set the number of minute after which you want your task to be executed.
OK.
You can't set the minutes from 0 to 59.
OK.
Because a single hour in 16 minutes.
So here you can set from zero to 59.
The next step represents our.
So our day consists of going to four hour.
OK.
Our clock is consisting of 24 hours.
So you can sit here numbers from zero to 23 zero minutes.
Well AM it walks like a 24 hour clock.
So at which time you want to execute your task you can set up that number here according to your needs.
OK.
Suppose you want exactly what you are task or come on after 12:30 or so how you need to said that you
need to send the hour star.
And the minute star do 30.
So what they were sent here and they I that will get executed at 12:30 p.m. OK.
The next presents day of month in a month.
There are a maximum of 31 days.
So you can set the number from 1 to 31 and what they were number is said here.
That combined will get executed and that the donkey and the next represents man.
So there are amounts.
So when you consider the number from one.
Well OK one wins in January.
OK.
So you can see the numbers if you want to sit or execute your task that particular month.
And the last one is day of week.
OK.
So zero and seven means Sunday and one means Monday or Tuesday and so on.
So if you want good around your task that particular day of the week then you can't sit there calling
to hear that number.
So there is one thing that I want to mention here.
Venu said the starter.
Suppose you said the minutes to start not from zero to 15 and would set it to start as it did then the
task order as you said here on the right side will be executed every minute of every minute.
OK.
The same logic is applied for every starter when you don't set it to particular day of month or month
or day of recall hour that that means the task will be executed OK for every month the day of month
hour and minutes.
OK.
So in this way These are works.
So let's see practically a whole new set of grown ups who set up the con jobs are there is a common
core has grown up.
OK.
And Nicholas pro-white hyphen e ave provide hope.
Then it will start you are across jobs in the mall.
When if you want to or list of jobs then type hyphen.
And if you want to remove any cron job then type Ifan are OK.
This way you can use the switches.
OK.
There are a few commands like the start restart or stop the cron jobs.
So if you want to start or see the status then just type service cron status.
And here you can see the cross-overs is running in this way.
You can see the status or static college or just type here.
Select deleter and attender.
So when you type or grandpap hyphen at first time then you will see the output like this.
OK.
This is asking you to choose the leader forward.
Oh come on Delphi.
OK.
So I want to select here four here because he represents the maker and number Gouri presence Nano is.
So the answer is simple for some users.
You can choose it according to a choice and go ahead.
OK so you create a job or two should do the job just kind of crunch time for me.
OK.
And I want to set up the cron job for taking the back off of the EDC directory OK that we have said
in the last lesson.
So because the DC needs global privilege so type your pseudo cross-tab the
OK so let's do that job here.
So I want who are the bad guys every minute.
So I'm going to set here start.
So let's do the five stars here.
And our job is to get the back up.
So provide the command are we get them here provide the filename I want it who did at some point on
our said and here the that you want to back up here.
Pro-white I fancy Zed.
Yes.
OK.
And yes.
Right now.
OK.
Let's move inside group three.
OK.
Here there is no file present with a double dot dot dot.
So that for one minute.
And let's see what happens.
See again hogi here you can see after one minute exampled Akbar God did their files get created in this
way you can set up Dikran jobs who take the back of all you can't perform any task that you want to
get.
This is the one way for setting up a cron job.
I want to set it for
let's see here.
First of all let's just get inside through and delete this file.
Pseudo r.m the blue dot dot dot.
And I've got this right now the current time.
OK.
Here you can see the current Burmese of 13.
OK.
Forking means it's 14:00 Woopie about 11 minutes.
So let's say the job here for us supports 14 billion.
OK.
So let's see how you set it up by changing our fee.
OK so yesterday on to I'll be
let's get insert more OK remove this command line and I want to know what task after 30 minutes after
mine 30 minutes.
OK.
I'll write it down.
OK.
Now we need to check this after one minute.
Let's see here what is your time.
OK.
These 14 13.
OK let's get it do
let's say who reads all the writing don't forget there is no files in this directory.
Let's see the date.
So it's 40 30.
So let's see what happens.
Alice
bouquet now of her.
Oh one minute you need to check the status of these tasks in order.
We have set it to 15 minutes at 2pm and 15 minutes and then see your desk.
OK it's done.
And let's see.
And here you can see in the root directory example dot dot dot does help file is created OK.
Of this 14 hour and 15 minutes means 14 minutes or time OK.
14 hours.
It's not exactly around to say You stupid 15 minutes.
Get in this way.
You can share task on the basis of one Veeck day of the point.
OK.
So in this production those can be used.
So there is another way of settling for us.
Let's get inside
D.C. and here you can see here.
These are the directory's corndog.
OK where you can go right on in these directories you can write your own script.
OK.
And you can run those clip on a monthly basis or hourly basis or daily basis you can you just need to
write down your own script and so that script in this directory and that scoop will really get executed
on the basis of where you were receiving minutes on the daily hourly order basis.
OK.
This is a robot.
And the last way we learn is important and very useful in this way you can set up Dikran jobs and lower
down the burden on your mind to perform specific tasks again and again.