LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 04-19-2016, 03:22 PM   #1
Frankie412
LQ Newbie
 
Registered: Apr 2016
Location: Kiev
Distribution: Debian
Posts: 2

Rep: Reputation: Disabled
Cron problem


English is not my native language so I'm sorry for any mistakes.

I have a problem with cron and I cant figure out whats wrong.

I have a scrip at location "/home/bob/autor.sh" with text(for example):
Code:
#!/bin/bash
echo test
Also I have created a config for cron in "/etc/cron.d" with name "ar" and single line:
Code:
*/1 * * * * root /bin/bash /home/bob/autor.sh
And it not working. My script is executable and working fine, but I cant run it with cron. Obviously, I'm missing something here.
 
Old 04-19-2016, 03:40 PM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,356

Rep: Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989
Is there any specific reason you want to use an /etc/cron.d config instead of putting it in root's personal crontab?

Also, how do you know it's not working? I don't see you redirecting the output to any files that you could check make sure it's running.
 
1 members found this post helpful.
Old 05-11-2016, 09:45 AM   #3
Frankie412
LQ Newbie
 
Registered: Apr 2016
Location: Kiev
Distribution: Debian
Posts: 2

Original Poster
Rep: Reputation: Disabled
suicidaleggroll

Thank you, forgot to reply. Problem solved, topic can be closed.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Strange Cron directories: /var/spool/cron/cron.GfqqGO Woodsman Slackware 4 05-11-2011 03:37 PM
cron.hourly cron.weekly cron.monthly and 0anacron. Are they necessary? glore2002 Debian 2 09-30-2009 09:57 PM
adding a perl script to cron.daily / cron.d to setup a cron job CrontabNewBIE Linux - Software 6 01-14-2008 09:16 AM
cron not working from crontab nor form /etc/cron/cron.d. What did SuSE change? JZL240I-U SUSE / openSUSE 11 01-04-2007 02:57 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 02:50 PM


All times are GMT -5. The time now is 04:31 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration