A look at the Cron utility and how you can use it to automate commands. Check out www.ezeelinux.com for more about Linux. To learn more about cron on Ubuntu: help.ubuntu.com/community/Cro...
Пікірлер: 50
@plutesknee51295 жыл бұрын
Some people are just amazing teachers, but you are one of the best! thankyou for you videos Joe.
@user-ts2wi7cq1n10 ай бұрын
Automation ensures that tasks are executed uniformly across different systems and environments, promoting consistency and standardization. This is crucial for compliance, security, and troubleshooting.
@notes_at_dusk5 жыл бұрын
I love your chilled-out style of tuition - keep it up!
@djsensacion78 жыл бұрын
What a treat, Cron Jobs and Bash scripting all in one video ! I see you have syntax coloring in your nano editor...
@Phoenixts8 жыл бұрын
Thanks for the great video. We shared it on our blog as a good way for readers to learn about cron and automation.
@EzeeLinux8 жыл бұрын
+Phoenix TS Thank you very much! :)
@webhunter29896 жыл бұрын
Your efforts are appreciated man
@pewlivepie50068 жыл бұрын
Thanks for the videos Joe. Very useful!
@hh31308 жыл бұрын
Thanks for the great video. Very useful information.
@cthedosboss51136 жыл бұрын
we need more people like you sir :)
@cbrash98 жыл бұрын
Great Video, very informative !!
@MasterArtMason4 жыл бұрын
Fantastic Joe! Thank you!
@cbrash98 жыл бұрын
A while ago I had my son using Manjaro, however being a rolling release he was not consistently updating which was concerning for me, so I switched him to Mint. Having watched this video I can see a huge advantage in using Cron to update any rolling release distro!!
@EzeeLinux8 жыл бұрын
+Colin Brash You could do that for sure. :)
@EzeeLinux8 жыл бұрын
+Colin Brash One more thought, the only problem I could foresee with setting auto updates up for Manjaro would be when it asks for confirmation to build updates from the AUR. It usually needs you to put your password in for that. Something to ponder. :)
@cbrash98 жыл бұрын
Yes good point!, I suppose that means the update would just fail?, and need to be done manually, that's acceptable, I may install arch with Architect linux on a separate hard drive and give it a try,I enjoy messing with installs :)
@cbrash98 жыл бұрын
I was also watching your CinnUbu vids, have you ever considered Architect linux for a minimal install for Cinnamon? have not been subscribed to your channel for long, but I'm thinking your base maybe Ubuntu and Mint which stands to reason for keeping it simple and stable.
@ayoob9997 жыл бұрын
excellent video ..and very useful.... .thanks
@JPRuehmann7 жыл бұрын
You should put an exit 0 at the end of your Scripts to gracefully close them.
@VidShoe136 жыл бұрын
You're a legend!!
@JPRuehmann7 жыл бұрын
Commands that run via skript on Cron did not have to run in the Background. They do it anyways at runtime. This only make it difficult to debug the script and to control the execution including clean up.
@onesandzeroes8 жыл бұрын
I tried to use the command "nmcli radio wifi off" in gnome-schedule, but it doesn't have any effect (it works fine in the terminal). I outputted it to a file, but it doesn't show any errors. The command also fails to work when I manually add a crontab. Other commands such as "ls > file" do work.
@tpasi2020UG3 жыл бұрын
Just amazing!
@dedelifestyles78366 жыл бұрын
Very informative
@50_Pence6 жыл бұрын
to add a date to that log add: date -R >> /home/joe/update.log
@mr_fallout31697 жыл бұрын
Really good
@bennasrghazi93232 жыл бұрын
I m a complete beginner... I have an error message telling me that (chmod :impossible d accéder a 'update. Sh' there s no file or directory.... I have written the file with sh extension using nano....
@jamesbaxter2812 Жыл бұрын
As I am watching you with Cron. I have a problem. I am using Linux Mint. across the top there is GNU NANO 4.8 you are showing the same thing but the number are differance. GNU as I know, stands for Gnucash. that is for keeking your bank account working. Also if you have stock/ticker in the same program. the help in the Gnucash is talking about the Cron. and I have to have an address for the Cron to go to as what you are saying. The Gnucash program is to take to a web site (not known to me) to where it gets updates. so if you understand, can you help me with this. Thanks
@VictorGallagherCarvings6 жыл бұрын
It looks like gnome-schedule is no longer in the Ubuntu repositories.
@spencerreppe75584 жыл бұрын
ok thanks I trying installing it, I got the "E: Unable to locate package gnome-schedule"
@kellingc3 жыл бұрын
I always have stderr append to the log files that I create. So, the apt-get command you had would look something like: apt-get dist-upgrade -y >> /home/joe/update.log 2>> /home/joe/update.log && This is a little more informative than just appending "All done". There isn't any reason why you can't point the error output to it's own file, either. That way, when you do an ls on your home directory, you can tell if there is an error or not without having to cat the log file. There are other things I do (like put the date in the file name) to allow for better troubleshooting, but this is a video about cron, not scripting. I won't go into a huge thing about logs , file naming, etc. I just wanted to let people know how to capture an error when running scripts and automated jobs.
@Khyree_Holmes8 жыл бұрын
What can I do with Cron Jobs? hmm.... i don't know.
@sablesanctum7 жыл бұрын
So... Since the cron job was made by root it's not going to ask for the password before running the script? It will all just run transparently in the background. Is that a correct assessment?
@EzeeLinux7 жыл бұрын
Yes. Cron runs as root. :)
@Ryan-vw8sq8 жыл бұрын
Hello, what is the "-e" after crontab for?
@ngomapa7 жыл бұрын
'e' is an option to edit. it will open an editor where you can manually schedule your task
@df3yt8 жыл бұрын
when does weekly run? if my pc is on on Monday off for a couple days and then on for a couple when will it run...?
@EzeeLinux8 жыл бұрын
+df3yt Not sure... If you have something critical that absolutely has to run weekly I'd set it manually for a specific time or run it manually. :)
@NicolaFrancica8 жыл бұрын
+df3yt Use anacrontab to avoid this kind of problems, Cron is more usefull for servers that are up and running all the time. Anacron does the same job but avoid the "system off" problem executing the 1st time it can after the supposed time you scheduled the task at. Google it for more infos :) P.S. Sorry for my english, I don't use it much, I'm a little bit rusted
@Classic.Car.Restorations.7 жыл бұрын
16.04 does not incude this gnome-schedule I found a deb file here askubuntu.com/questions/785657/i-cant-install-gnome-schedule-on-ubuntu-16-04
@hkme45257 жыл бұрын
what if i want to run a task every time my computer reboots ???
@spectralberserker7 жыл бұрын
you use a different script system like "rc.local" for example askubuntu.com/questions/9853/how-can-i-make-rc-local-run-on-startup
@SotoJeleb8 жыл бұрын
What hapens if youre computer is off when it is suposed to run a comand/script? If it skips the comand can you set it up that it runs the comand when you boot next time. p.s. Awesome chanel!
@EzeeLinux8 жыл бұрын
+SotoJeleb As far as I know, the system will just skip that cron job if it is not up and running at the appointed time. Pick times when you know the system will be up and running or just do it manually. Cron was designed for servers and mini computers that run all the time. :)
@cl98267 жыл бұрын
Use anacron in that case. Anacron is cron for desktops and laptops. That is, it doesn't expect the system to be on 24/7 and will run the command on next boot if it misses the scheduled backup time.
@nloomans8 жыл бұрын
why did you use `more` instead of `less`?
@ironnerd25114 жыл бұрын
He mentioned in other videos that he may use more if the text file is small enough so no scrolling is necessary (expected to fit in one screen). And maybe more being older than less, for backwards compatibility. ¿Perhaps? My guess...
@MO-hq4iz8 жыл бұрын
Sunday is zero in the USA, not in is most of Europe. We have Monday as zero.