Page 1 of 4 1234 LastLast
Results 1 to 10 of 32
Discuss [Cron] on the iPhone at the Free Toolchain Software (Cydia App's) - Hackint0sh.org; If you have a look at the running processes on the iPhone (e.g. using 'ps ...
  1. #1
    Rookie Array

    Join Date
    Dec 2007
    Posts
    13
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default [Cron] on the iPhone

    If you have a look at the running processes on the iPhone (e.g. using 'ps ax'), you can find cron running in the background.

    "Nice," I thought and added a crontab entry to fire Erica Sadun's tweet script on a regular schedule. This has many advantages over creating a launch deamon. First, I can adjust the time and schedule to much more detail and, second, I don't have to reboot the iPhone on any change in this schedule.

    This works well as long as the iPhone in switched on, but unfortunately, cron seems not to be active during stand-by.

    Is this the case or do I miss something basic?

    Cya,

    freefall.



  2. #2
    Rookie Array

    Join Date
    Dec 2007
    Posts
    13
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Pushing this up after a week shouldn't be too impolite.

    Haven't anybody tried to use cron, yet?

    Cya,

    freefall.
    Firmware: 1.1.4 | Baseband: 04.04.05_G | Bootloader: 3.9

  3. #3
    Newbie Array

    Join Date
    Sep 2007
    Posts
    6
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    its active even while on sleep mode. at least mine does. how did you configure your cron jobs?

  4. #4
    Rookie Array

    Join Date
    Dec 2007
    Posts
    13
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    I called "crontab -e" and added

    */5 * * * * /var/root/bin/tweet

    It worked fine while the iPhone was turned on but stopped working as soon as I put it to sleep.

    Cya,

    freefall.
    Firmware: 1.1.4 | Baseband: 04.04.05_G | Bootloader: 3.9

  5. #5
    Newbie Array

    Join Date
    Sep 2007
    Posts
    6
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    user crontabs doesn't work for me too. use system crontab. create 1 crontab file in /etc. it should work, even while sleeping.


  6. #6
    Rookie Array

    Join Date
    Jul 2007
    Posts
    12
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Cron on the iPhone will not bring the phone out of sleep. Launchd also has the same problem.

    You will find that this is a problem goes beyond the iPhone implementation of OSX. To get the iPhone to wake up for an event you need to schedule a power event and to my knowledge that is only possible by making an OS call.

    It should be possible to hack a little program together that will run something at a future time. No promises as I'm traveling but I'll look at it.



    Quote Originally Posted by freefall View Post
    If you have a look at the running processes on the iPhone (e.g. using 'ps ax'), you can find cron running in the background.

    "Nice," I thought and added a crontab entry to fire Erica Sadun's tweet script on a regular schedule. This has many advantages over creating a launch deamon. First, I can adjust the time and schedule to much more detail and, second, I don't have to reboot the iPhone on any change in this schedule.

    This works well as long as the iPhone in switched on, but unfortunately, cron seems not to be active during stand-by.

    Is this the case or do I miss something basic?

    Cya,

    freefall.
    Last edited by freedom; 03-04-2008 at 12:24 AM.

  7. #7
    Rookie Array

    Join Date
    Jul 2007
    Posts
    12
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Update:

    Ok give this a try. It will execute an arbitrary command line at a specified date and time, even if the phone is asleep. It is possible to change the code to even wake the phone from power off.

    Download from here,

    h**p://www.rapid$hare.com/files/96834608/Schedule.zip.html

    Command line arguments,

    Code:
    # ./Schedule -h
    Usage: Schedule [OPTION]
    -H	xx	Hour
    -m	xx	Minuites
    -M	xx	Month
    -D	xx	Day
    -Y	xx	Year
    -C	xx	Command to execute with arguments
    -p		Delete any AutoWake events and exit
    An example using Erica's playaudio,

    Code:
    ./Schedule -H 16 -m 5 -M 3 -D 3 -Y 2008 -C "/var/root/bin/playaudio /Library/Ringtones/Duck.m4r"

  8. #8
    Senior Professional Array

    Join Date
    Aug 2007
    Posts
    231
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    19

    Default

    what is */5 in a crontab ?

  9. #9
    Rookie Array

    Join Date
    Dec 2007
    Posts
    13
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Quote Originally Posted by adyh View Post
    what is */5 in a crontab ?
    At the first position, this means "every 5 minutes" instead of "every minute", what a single * would be.

    Cya,

    freefall.
    Firmware: 1.1.4 | Baseband: 04.04.05_G | Bootloader: 3.9

  10. #10
    Rookie Array

    Join Date
    Dec 2007
    Posts
    13
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Quote Originally Posted by freedom View Post
    Update:

    Ok give this a try. It will execute an arbitrary command line at a specified date and time, even if the phone is asleep. It is possible to change the code to even wake the phone from power off.
    Great start. But I've got a few questions:

    • Where does it come from?
    • Any documentation around (other than -h)?
    • How does it affect battery usage?
    • Are there any interval options?
    • Does it really have to run in background?


    Cya,

    freefall.
    Firmware: 1.1.4 | Baseband: 04.04.05_G | Bootloader: 3.9


 

 
Page 1 of 4 1234 LastLast

Similar Threads

  1. what does com.apple.cron for?
    By wei803 in forum General
    Replies: 0
    Last Post: 10-25-2007, 11:29 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 03:30 PM.
twitter, follow us!