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 01-21-2018, 05:03 AM   #46
stigslim
LQ Newbie
 
Registered: Dec 2017
Posts: 26

Original Poster
Rep: Reputation: Disabled

/opt/sbin/cron -c gives me,

/opt/sbin/cron: can't lock /opt/var/run/cron.pid, otherpid may be 10559: Resource temporarily unavailable

not sure how to chech cron version.
 
Old 01-21-2018, 05:10 AM   #47
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,795

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
you have already posted it, 4.1.9, but it is quite old, at about 10 (or 20?) years old (you have the man page installed, I don't really know how that version works).
You have started cron over a running one, that won't and shouldn't work. You need to kill the previous one. If you are sure there is no cron running you can remove /opt/var/run/cron.pid, before starting it again (by the way I told you -n, not -c, but probably ...)
 
Old 01-21-2018, 04:48 PM   #48
stigslim
LQ Newbie
 
Registered: Dec 2017
Posts: 26

Original Poster
Rep: Reputation: Disabled
Still nothing happening, the line executes from the command line and prints a log file (which shows no errors). But Cron just does not run anything at all. cron.pid only sticks around whilst the process appears to be running and then its gone. Is there a better/younger version that you can suggest that might work?.
 
Old 01-22-2018, 12:54 AM   #49
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,795

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
in general cron may send also mails, so you can check if the user has got any. (but probably not). You need to type only mail. (see man page again).
You cannot easily upgrade your cron, you need to use what you have. Finally if a command works from command line but does not work from cron means usually misconfigured cronjobs. You might want to write a shell script which will contain your command, including redirection, save stdout and stderr and everything else you need. And you only will run this shell script both from command line and cron.
 
Old 01-22-2018, 07:13 AM   #50
stigslim
LQ Newbie
 
Registered: Dec 2017
Posts: 26

Original Poster
Rep: Reputation: Disabled
Complete dead end with cron now, Don't think I have the correct knowledge to write a script. I am after all a complete novice. Can you point me at a tutorial that may help me out.
 
Old 01-22-2018, 08:55 AM   #51
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,795

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
probably you can start here: http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html
or here: https://www.howtogeek.com/67469/the-...ng-the-basics/
 
1 members found this post helpful.
Old 01-22-2018, 09:00 AM   #52
stigslim
LQ Newbie
 
Registered: Dec 2017
Posts: 26

Original Poster
Rep: Reputation: Disabled
Wish I could have figured out it but none the less, thanks for your help.
 
Old 01-22-2018, 09:01 AM   #53
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,795

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
if you wish to work on linux you must learn the basics. Otherwise.....
 
  


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
advice for a begginer ApacheOmega Red Hat 21 04-12-2015 09:30 AM
please help me IM BEGGINER IN LINUX.. gkarthik078 Linux - Kernel 6 06-29-2011 03:08 AM
LXer: Absolute Linux is an absolute winner LXer Syndicated Linux News 0 08-07-2007 06:32 PM
Perl Begginer Cool_Hand_Luke Programming 6 03-11-2005 04:34 PM
For begginer,where can I start NoThing Linux - General 1 08-03-2004 12:01 PM

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

All times are GMT -5. The time now is 12:05 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