FORUMS

[APP][TOOL][AUTOMATION] Cron Phone Your Phone[UPDATE (9/28/11)]!!

1,003 posts
Thanks Meter: 115
 
By ASimmons, Retired Recognized Developer on 17th June 2011, 02:27 AM
Post Reply Email Thread
Major Changes to the UI and usage Check the market for the latest version or use the version attached to this post. If you have trouble with the posted version use the market version as it will always have the lastest fixes. The attached version might have an issue I did update the attached version but I won't manage it here.

1. Complete task ui revamp, easier building and management of tasks.
2. Added cron string builder, you can now build time string with rolling pickers and show you the next execution date (great for visualizing your time string). This will build 98% of the schedules most of us use.

3. Clicking on the clock in the Cron tab will now show all the active queued tasks (tasks that were active when cron was started).

4. Added option to run on boot for a task, this makes tasks execute if the option is checked and cron is set to auto restart. This allows a task to run only, at boot, and the task does not have to be active. (Sascha Kerkeling).
5. Added option to import scripts, you can now import the contents of a script file (Sascha Kerkeling).
6. You can now activate/deactivate a task from the tasks view.

7. I have kept the old tasks view in place for this update so that you can trasnfer any existing tasks over... it will be removed next update.

8. Added cron change log... this will automatically show once every update.
9. Added safe guard so that a reboot command cannot be fired with the execute on boot option (just in case).

10. Added better logging of why task commands fail, this will show as a complete stack trace in the execution log.

11. Added 6 new default tasks that might be helpful (Sascha Kerkeling, A. Simmons).

This is cron for your phone a small app I developed to allow me to restart/shutdown my phone on a schedule, but Cron has a billion uses and I wanted to see how others will use it I also use it to backup my market apps on a schedule.

**WARNING YOUR PHONE NEEDS TO BE ROOTED TO USES THIS APP**
This app can be dangerous if used wrong, if you use this app incorrectly and mess your phone up its your fault not mine. You wouldn't blame snap-on if the wrench you used breaks a bolt on your car, so don't try and blame me for what you do wrong with this tool. If you do I will only point at you and laugh.
**WARNING YOUR PHONE NEEDS TO BE ROOTED TO USES THIS APP**

Features:
Uses the standard Cron4Phone time string schedule.
Run all type of shell commands on any schedule you can think of.
Run tasks to shut your phone off on a schedule.
Auto restart so Cron4Phone continues to run even after a restart.
Small apk foot print.
unlimited concurrent tasks available.
Set a task as inactive/active.
Test execution setting to log commands only.


I'm really looking forward to seeing how others will use this tool. Please feel free to point out errors or suggestions. If you want help setting schedule I can give pointers.

Android market download
Attached Thumbnails
Click image for larger version

Name:	ss-480-0-7.jpg
Views:	1119
Size:	21.5 KB
ID:	733725   Click image for larger version

Name:	ss-480-1-8.jpg
Views:	1104
Size:	47.2 KB
ID:	733726   Click image for larger version

Name:	ss-480-2-8.jpg
Views:	987
Size:	33.7 KB
ID:	733727   Click image for larger version

Name:	ss-480-3-0.jpg
Views:	965
Size:	34.3 KB
ID:	733728  
Attached Files
File Type: apk cron4phone.apk - [Click for QR Code] (169.2 KB, 507 views)
The Following 5 Users Say Thank You to ASimmons For This Useful Post: [ View ] Gift ASimmons Ad-Free
14th September 2011, 12:30 AM |#2  
VerizonKoolaid's Avatar
Member
Thanks Meter: 17
 
More
ooooh

as soon as I can liberate a copy from a market enabled phone I will begin tinkering... that might take a while

would you consider releasing it to f-droid.org if your license allows?
The Following User Says Thank You to VerizonKoolaid For This Useful Post: [ View ] Gift VerizonKoolaid Ad-Free
14th September 2011, 11:57 PM |#3  
ASimmons's Avatar
OP Retired Recognized Developer
Flag Tampa Bay
Thanks Meter: 115
 
More
Here you go
Here's a copy... I haven't opened the source up although I probably will in the future, when I have more time to spend on it (working on a video game). This copy is signed with the same key as the market version and its ad supported I will slowing be updating the task management part of the ui.

this is the market description

*****YOUR PHONE NEEDS TO BE ROOTED TO USES THIS APP*****
This app can be dangerous if used wrong, if you use this app incorrectly and mess your phone up its your fault not mine. You wouldn't blame snap-on if the wrench you used breaks a bolt on your car, so don't try and blame me for what you do wrong with this tool. If you do I will only point at you and laugh.
*****YOUR PHONE NEEDS TO BE ROOTED TO USES THIS APP*****

-----------NEW INFO READ------------
After another full audit and help from Sascha Kerkeling and M. Porter, I redesigned Cron to no longer use long running service and instead now (correctly) uses AlarmManager to precisely execute tasks in a WakefullIntentService. This will will insure that all task are executed even when the phone is in deep sleep (even when the phoen doesn't hold any other wake locks) and barely uses any resources to accomplish this. I will now be able to focus on the UI... Dynamic task here we come!
-----------NEW INFO READ------------

Cron4Phone is a time-based job scheduler in Unix-like computer operating systems. Cron4Phone enables users to schedule jobs (commands or shell scripts) to run periodically at certain times or dates. It is commonly used to automate system maintenance or administration, though its general-purpose nature means that it can be used for other purposes, such as connecting to the restart your phone and backing up apps. This is a foreground service so that it is guaranteed to stay running, use the home key to back out of the app or double tap the back arrow to kill the app. Killing the app kills the service.

Features:
Uses the standard Cron4Phone time string schedule.
Run all type of shell commands on any schedule you can think of.
Run tasks to shut your phone off on a schedule.
Auto restart so Cron4Phone continues to run even after a restart.
Small apk foot print.
5 concurrent tasks available.
Set a task as inactive/active.
Test execution setting to log commands only.

This tool can be used to do endless amount of things, I'm really looking forward to see what you guys can use it for so please share your ideas, command and schedules.

I have provided 3 tasks that I thought would be the most useful to most users shutdown, restart, and backup apps.
15th September 2011, 03:50 AM |#4  
Senior Member
Thanks Meter: 10
 
More
Interesting

Sent from my SCH-I500 using XDA App
The Following User Says Thank You to Vinnie981 For This Useful Post: [ View ] Gift Vinnie981 Ad-Free
15th September 2011, 08:36 AM |#5  
Senior Member
Flag Jakarta
Thanks Meter: 462
 
Donate to Me
More
testing your application, it's really simple.., i'm hoping custom task can be added more
The Following User Says Thank You to fajarep For This Useful Post: [ View ] Gift fajarep Ad-Free
15th September 2011, 06:53 PM |#6  
ASimmons's Avatar
OP Retired Recognized Developer
Flag Tampa Bay
Thanks Meter: 115
 
More
New version
EDIT: removed refer to the OP...

I attaching a new version to this post, it fixes a bug with the restart on reboot not registering your tasks. Basically if your phone reboots and you have active tasks and cron is started it will keep on running.

As for the ui I will slowly work on updating the task tab so that task can be managed dynamically, other than that the rest of the ui will basically stay the same, I want it to stay simple and small.

The market version has also been updated.
28th September 2011, 04:13 PM |#7  
ASimmons's Avatar
OP Retired Recognized Developer
Flag Tampa Bay
Thanks Meter: 115
 
More
ttt for updates!
30th September 2011, 05:48 AM |#8  
Mattix724's Avatar
Senior Member
Flag Phoenix, Arizona
Thanks Meter: 2,539
 
More
Very nice app, I would like to see more Linux tools working with Android.

Sent from my Zio using xda premium
The Following User Says Thank You to Mattix724 For This Useful Post: [ View ] Gift Mattix724 Ad-Free
30th September 2011, 02:57 PM |#9  
ASimmons's Avatar
OP Retired Recognized Developer
Flag Tampa Bay
Thanks Meter: 115
 
More
Yes and this was one that I thought was needed, and while you can run cron on your phone through busy box, this app doesn't need that module and uses standard java to mimic cron all while putting a clean ui on top of it.

Thank you.
17th February 2012, 10:37 PM |#10  
Moon Shadow - NM's Avatar
Senior Member
Flag Albuquerque
Thanks Meter: 503
 
Donate to Me
More
[EDIT]
ACK! Okay, I just stopped and started the cron and it is now working. Sorry about this post. :-/
[/EDIT]

I am going to resurrect this thread because I can't figure this out and I'm a Unix admin. I have tried to set a schedule for a job to run every 5 minutes (this was to test, the actual job will run every 30 minutes). I have tried to set */5 * * * *, /5 * * * *, and 0,5 * * * * and none of them work for every 5 minutes. Can you look into this or give an example in here? Thanks!
31st December 2014, 10:13 PM |#11  
Senior Member
Thanks Meter: 48
 
More
fstrim
If anyone is still out there -- I use Cron4Phone to schedule daily reboots and would like to add an fstrim command to run daily, maybe weekly. Can anyone help me with setting this up (command syntax, etc)?
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes