maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   General (https://talk.maemo.org/forumdisplay.php?f=7)
-   -   Problem executing scripts with fcron (https://talk.maemo.org/showthread.php?t=71445)

madmaze 2011-03-24 15:55

Problem executing scripts with fcron
 
Hello Everyone,

I have some backup scripts I want fcron to run for me.
i have fcron working for commands, but I cannot execute scripts for some reason.

fcrontab -e

15 10 * * * touch /home/user/test
16 10 * * * echo "herro" > /home/user/test_2
17 10 * * * /home/user/test_script
18 10 * * * /opt/test_script


so the first 2 lines work and are fine, but the last 2 dont run.
both scripts have +x permission and work if i execute them manually.

Any Ideas why this may be happening?


Thanks,

Maze

vi_ 2011-03-24 15:57

Re: Problem executing scripts with fcron
 
post the scripts...

9000 2011-03-24 16:03

Re: Problem executing scripts with fcron
 
Quote:

Originally Posted by madmaze (Post 974797)
Hello Everyone,

I have some backup scripts I want fcron to run for me.
i have fcron working for commands, but I cannot execute scripts for some reason.

fcrontab -e

15 10 * * * touch /home/user/test
16 10 * * * echo "herro" > /home/user/test_2
17 10 * * * /home/user/test_script
18 10 * * * /opt/test_script


so the first 2 lines work and are fine, but the last 2 dont run.
both scripts have +x permission and work if i execute them manually.

Any Ideas why this may be happening?


Thanks,

Maze

I found that this fcron and the cron in the repository behave strangely lately. So I used alarmed instead. It has a nice GUI, and it uses the system schedule engine alarmd so it isn't required to run an extra scheduler.

If you still have to stick to fcron/cron, you may put run-standalone.sh in front of the command like this:

Code:

17 10 * * * run-standalone.sh /home/user/test_script > /dev/null 2>&1
18 10 * * * run-standalone.sh /opt/test_script > /dev/null 2>&1


madmaze 2011-03-24 17:16

Re: Problem executing scripts with fcron
 
the script im using is just for testing and it

#!/bin/bash
echo "herro" > /home/user/test_1

Im going to try alarmd to see if i can make it work there, though i would like it to work with fcron

9000 2011-03-24 17:18

Re: Problem executing scripts with fcron
 
Quote:

Originally Posted by madmaze (Post 974865)
the script im using is just for testing and it

#!/bin/bash
echo "herro" > /home/user/test_1

Im going to try alarmd to see if i can make it work there, though i would like it to work with fcron

"alarmed". alarmd is something that comes with your N900 by default. ;)

madmaze 2011-03-24 17:51

Re: Problem executing scripts with fcron
 
hmm now this odd.
I started another teminal and it all works again.. with fcron that is.


All times are GMT. The time now is 11:11.

vBulletin® Version 3.8.8