Jump to content


Photo

Cron don't work

cron

  • Please log in to reply
7 replies to this topic

#1 spool

  • Member
  • 11 posts

0
Neutral

Posted 17 May 2014 - 19:19

Hi

 

I have vu+solo + openpli 4.0, I want to use crontab with somes scripts

 

I have installed busybox-cron and edit crontab with crontab -e

 

root@vusolo:~# crontab -l
1 * * * * /etc/cccamchk.sh >/etc/1.txt

but when I check 1.txt file..already empty

 

if I execute cccamchk.sh manually it's work

 

root@vusolo:~# /etc/cccamchk.sh
CCcam... ok

 

ps command output :

 

997 root      3144 S    crond -c /etc/cron/crontabs
root@vusolo:~# cat /etc/cron/crontabs/root
1 * * * * /etc/cccamchk.sh >/etc/1.txt

 


Edited by spool, 17 May 2014 - 19:20.


Re: Cron don't work #2 spool

  • Member
  • 11 posts

0
Neutral

Posted 21 May 2014 - 21:12

no answer ?



Re: Cron don't work #3 WanWizard

  • PLi® Core member
  • 70,492 posts

+1,810
Excellent

Posted 21 May 2014 - 22:59

Not from me, here cron just works.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Cron don't work #4 Veen

  • Member
  • 13 posts

0
Neutral

Posted 22 May 2014 - 10:15

Did u use tabs in your crontab times instead of spaces? Mine looks like this:

 

0       0       *       *       *       /bin/sh /etc/dtdns.sh > /dev/null 2>&1

 

I also had to add "/bin/sh" in front of the script I want to run, otherwise it just didn't run.



Re: Cron don't work #5 Erik Slagter

  • PLi® Core member
  • 46,969 posts

+541
Excellent

Posted 22 May 2014 - 15:55

Then you didn't change the file mode bits of the script to 700 / -rwx------. Chmod u+x script.sh


Edited by Erik Slagter, 22 May 2014 - 15:55.

* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: Cron don't work #6 spool

  • Member
  • 11 posts

0
Neutral

Posted 22 May 2014 - 20:13

Thanks for your answers

 

my script :

#!/bin/sh
	sleep 2
	if ps l |grep -v grep |grep -c CCcam >/dev/null
			then
				echo "CCcam... ok"					
			else
				echo "CCcam... restarting"
				/usr/bin/CCcam
	fi
exit

 

file chmod is 755

 

any idea ?



Re: Cron don't work #7 blzr

  • PLi® Core member
  • 2,270 posts

+118
Excellent

Posted 22 May 2014 - 21:23

and you get the empty txt file, or no file at all?
just tried your script (w/oscam actually) with cron, and everything seemed to work as expected

note, if you'd like a cronjob to be executed every minute (what I suspect was your intention?), syntax should be:
* * * * * /etc/cccamchk.sh >/etc/1.txt
cronjob as you have defined it (with 1 for minutes), would run your script one minute past every full hour...
True sarcasm doesn't need green font...

Re: Cron don't work #8 spool

  • Member
  • 11 posts

0
Neutral

Posted 22 May 2014 - 21:50

Oops

 

you're right, the problem was on my cron task

 

problem resolved





Also tagged with one or more of these keywords: cron

2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users