periodic_scheduler: fix timeout invocation

The current code forgets to pass a time spec to the -k param leading
it to barf whenever it tries to run a job:
 + timeout -k 300 sh -c "$@" -- /sbin/crash_sender
 timeout: invalid time interval 'sh'
 Try 'timeout --help' for more information.

Set the kill fallback to 10 seconds.  This will fire after the main
timeout has been sent to the code.

While we're here, drop the shell indirection.  None of our jobs are
using it, and it's not clear whether we want to let people run shell
code directly rather than just invoke a program.  This saves us from
spawning the shell and leaving it running for the life of the job.

TEST=manual; loaded onto a dev device and watched crash_sender get run

Change-Id: I4cb6dc752c415803047bb4c3eb310589ab444d0d
Reviewed-by: Ben Chan <>
Tested-by: Mike Frysinger <>
1 file changed