RaspPi is fubar and cron wouldn't run at all.

This forum is for discussion about general software issues.

RaspPi is fubar and cron wouldn't run at all.

Postby vincentleest » Thu May 21, 2015 11:52 pm

Hi All,

I'm not sure what happened to my RaspPi, but it when read-only file system mode. So i Added rw in front of rootwait in cmdline and it worked.

Now I want to configure my pi to run a cron job which runs a ruby script. First, problem is cron wouldn't run at all

crontab -l
$this->bbcode_second_pass_code('', '
[vincent@alarmpi ~]$ crontab -l
15 22 * * 1-5 export HOME=/home/vincent; /home/vincent/workspace/Random/HKEX/fetchData.sh
[vincent@alarmpi ~]$ sudo !!
sudo crontab -l
[sudo] password for vincent:
* * * * 1-5 /home/vincent/workspace/Random/HKEX/iihk.rb 2&1 >> /tmp/log
* * * * 1-5 echo "lol" >> /tmp/log
')
I want to run iihk.rb

After a minute
$this->bbcode_second_pass_code('', '
[vincent@alarmpi home]$ cat /tmp/log
cat: /tmp/log: No such file or directory
')

Secondly, I believe there are some issues with ruby path, and cron cannot locate the gems i used in the script.

$this->bbcode_second_pass_code('', '[vincent@alarmpi HKEX]$ ls -al iihk.rb
-rwxrwxrwx 1 vincent vincent 2471 May 22 06:47 iihk.rb')

$this->bbcode_second_pass_code('', '[vincent@alarmpi home]$ ls -al .
total 28
drwxr-xr-x 4 root root 4096 Aug 23 2014 .
drwxr-xr-x 17 root root 4096 Mar 23 04:19 ..
drwx------ 2 root root 16384 Aug 23 2014 lost+found
drwxrwxrwx 9 vincent vincent 4096 May 22 07:34 vincent')

Any help is appreciated.
vincentleest
 
Posts: 2
Joined: Thu May 21, 2015 10:37 pm

Re: RaspPi is fubar and cron wouldn't run at all.

Postby moonman » Fri May 22, 2015 12:19 am

Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: RaspPi is fubar and cron wouldn't run at all.

Postby vincentleest » Fri May 22, 2015 12:34 am

I believe it is running.

$this->bbcode_second_pass_code('', '
[vincent@alarmpi home]$ systemctl status cronie
* cronie.service - Periodic Command Scheduler
Loaded: loaded (/usr/lib/systemd/system/cronie.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 1970-01-01 08:00:19 HKT; 45 years 4 months ago
Main PID: 161 (crond)
CGroup: /system.slice/cronie.service
`-161 /usr/bin/crond -n

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
')

$this->bbcode_second_pass_code('', '[vincent@alarmpi home]$ ps -aux | grep cron
root 161 0.0 0.4 3144 2032 ? Ss 06:41 0:00 /usr/bin/crond -n
vincent 22595 0.0 0.2 2644 1276 pts/0 S+ 08:34 0:00 grep cron
')
vincentleest
 
Posts: 2
Joined: Thu May 21, 2015 10:37 pm


Return to General

Who is online

Users browsing this forum: No registered users and 15 guests