LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 02-18-2020, 06:57 AM   #1
baldur_1
Member
 
Registered: Sep 2010
Posts: 275

Rep: Reputation: 28
fc 31 server not running cron jobs


okay so i have a bunch of programs that run. i put them in /etc/cron.d in a file. they run on my pc however they are not running on my servers. i have checked documentation and i find nothing that says cron has been disable. the permissions are correct on the files but they are not running. any help as to why?
 
Old 02-18-2020, 07:28 AM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,631

Rep: Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696
So, what have you done to make them run?
What have you done to add logging so you can tell if they TRIED to run?
HAW did you add them to cron?
Have you done anything to ensure that they run in the default CRON environment (It IS different than your user environment)?
Have you checked that your crond service is running?
 
Old 02-18-2020, 07:34 AM   #3
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Let me add that cron logs its activities. Where the log messages are stored depends on your configuration. In an enterprise environment, you will probably have rsyslogd, but there may be sophisticated log solutions and log management systems like ElasticSearch-Logstash-Kibana.
 
Old 02-18-2020, 07:57 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,704

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
Quote:
okay so i have a bunch of programs that run. i put them in /etc/cron.d in a file.
The contents of file in /etc/cron.d should have the same syntax as that of a /etc/crontab entry. There should be existing files in the cron.d directory, check their contents. Make sure the file has the same permissions as those existing files.

No extra steps are required to add files to system cron directories like a users cron job.
 
Old 02-18-2020, 08:11 AM   #5
baldur_1
Member
 
Registered: Sep 2010
Posts: 275

Original Poster
Rep: Reputation: 28
yeah, good points all. the /etc/cron.d file with jobs is from my fedora 29 server. i copied the file, which ran perfectly in fc 29 server, to /etc/cron.d in fc 31 server and so far the jobs do not run. i have two computers with fc31 server on it and neither are they running their jobs. meanshile, i have two other computers with fc31 kde spin workstation on them, both run the cron jobs fine.

i do have the jobs pointed to logs, they say nothing and for one job set to run, it should create a file that isnt being created.

as for logs, i have no idea where these logs are being stored unless it is in the chrony folder in my log director (for cron itself not my jobs, i know where those are). i have parsed messages and not found anything and dont see any other jobs.

when i went to documentation for fedora it said it should install the package crond. there is no package crond so it cannot run. but then again, i dont get a crond service on my pcs but those seem to be running my unison job fine.

oh, as i have said, i have checked the permissions and the file has all the correct permissions acording to the other files in the directory and what it had under fc 29.
 
Old 02-18-2020, 08:16 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,704

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
Did you also copy the actual script / program etc that the cron.d file is supposed to run?
 
Old 02-18-2020, 08:27 AM   #7
baldur_1
Member
 
Registered: Sep 2010
Posts: 275

Original Poster
Rep: Reputation: 28
wow, i figured it out. the packages cronie and anacron-cronie are not installed by default apparently on the server but they are on the pc. i thought the package was crond. i misread. so you need to install those two on the server and then

Code:
systemctl start crond
systemctl enable crond
and that is supposed to solve it. i just did that so now i got to see it work.

also, thanks michaelk for the help and yes, i did move those files as well.
 
  


Reply



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
Show/stop currently running cron jobs; enable/disable jobs in various crontabs leniviy Linux - Software 1 10-27-2017 05:59 AM
Where are cron jobs located when not under /var/spool/cron/root? NotionCommotion Linux - Newbie 6 09-07-2012 07:33 AM
[SOLVED] Anacron jobs running twice a day and weekly jobs not running at all... sapeurcamembert Linux - General 0 02-28-2012 09:20 PM
Cron jobs not running on server (Ubuntu 11.10) jamespetts Linux - Server 8 01-23-2012 03:34 PM
cron hourly, daily, cron.d jobs don't execute eggsmartha Linux - General 3 09-17-2007 06:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 09:18 PM.

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