LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-18-2022, 09:05 AM   #1
justinwyllie
LQ Newbie
 
Registered: Feb 2014
Posts: 11

Rep: Reputation: Disabled
Are scripts in /etc/cron.daily always run?


Hi

I have run a script which lists all the cron jobs for all users. I am running AlmaLinux 8.6 with the Plesk Control panel. Most of the cron jobs listed are owned by psaadm - they have been set up by Plesk and i see them in the Plesk scheduler.

But - in addition to this there are scripts in e.g. /etc/cron.daily - which do not appear to be listed when I output all the cron jobs for all users. (this script loops through /etc/passwd and runs crontab -u $user for each user).

Do these scripts in /etc/cron.daily run? I have seen that they may be run by anacron? How could I check? And why are they not listed by the method above?

Thanks.
 
Old 08-18-2022, 09:49 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Anything in /etc is a system cron job. /etc/crontab, /etc/cron.hourly, /etc/cron.weekly, /etc/cron.daily, /etc/cron.mounthly and /etc/cron.d. Typically System Administrators jobs are scheduled there and jobs required by specific daemons like logrotate. User's cron jobs are located in /var/spool/cron

cron basically assumes the computer runs 24/7. If the computer is off when a job is scheduled to run there is no mechanism to automatically make sure it runs at next boot. anacron will run certain jobs if scheduled regardless of when the computer is running. Some distributions will make sure that certain jobs run regardless based on either cron or anacron.
 
1 members found this post helpful.
Old 08-18-2022, 09:53 AM   #3
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Have you looked at /etc/anacrontab?

They are not listed because those jobs are not run directly by a user in /etc/passwd (they are not a crontab job).
 
1 members found this post helpful.
  


Reply

Tags
cron



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Scripts in cron.daily are not running daily abefroman Linux - Server 1 12-23-2014 12:11 PM
Debian daily cron job won't run, but does run in cron.hourly. sandersch Linux - General 7 05-24-2012 01:50 AM
What time do the scripts in /etc/cron.daily run? abefroman Linux - Server 3 01-06-2010 03:01 PM
/etc/cron.d and /etc/cron.daily bytez Linux - General 2 03-06-2007 03:21 AM
Can any one plz explain why/what for cron.d, cron.daily, cron.weekly etc are there. mavinashbabu Linux - Newbie 4 09-21-2006 01:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration