Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (3) </ [1] 2 3 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: scheduling a task, alternative to cron?< Next Oldest | Next Newest >
rupert2 Offline





Group: Members
Posts: 2
Joined: Mar. 2006
Posted: Mar. 19 2006,14:48 QUOTE

I'm a little new to DSL/Linux but the other distros I've used before  had 'cron' or 'at' to schedule a task/script to be run.  I don't see that with DSL.  I'm running a frugal install with JWM desktop, is there some function in the DSL frugal install or the JWM desktop that I could use to trigger a script to be run at a set time and date?

I've read that some users have done an apt-get to install cron but I didn't think that would work with a frugal install. Am I wrong?

The other thing I was thinking about was creating (if I had any idea how to do it)   a script that uses a SQLite database and 'wakes up' every five minutes to see if something needs to be launched. Does anyone have this script in their backpocket? Might be a nice, small addition to the DSL base system.
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Mar. 19 2006,16:40 QUOTE

You can install applications into frugal with apt-get or dpkg, but you will need to reinstall them every time your reboot.

One thing to be careful with when using apt-get is that it will often take liberties with the support files it wants to install.  Since these packages were built specifically for the more fully-stocked Debian, they may require certain versions  of some libraries and other programs that are not available in DSL.  In contrast, myDSL packages are made to work with what DSL already has as much as possible. If they are compiled specifically for DSL they may be compiled to work with DSL-specific libraries, and sometimes have features disabled in order to prevent the need to add more software.


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
_pathos Offline





Group: Members
Posts: 91
Joined: Aug. 2005
Posted: Mar. 20 2006,06:30 QUOTE

could this be done with a bash script?
Back to top
Profile PM 
newOldUser Offline





Group: Members
Posts: 241
Joined: Oct. 2004
Posted: Mar. 21 2006,03:41 QUOTE

not sure how a bash script could do it.... what would you do? read a text file with Time and Task information? Maybe with flua, don't really know what functions flua has available. I guess DSL does come with a 'Calendar' utility, maybe it could be modified ( a lot ) or used as a starting point. What's that SQLite book app written in?  

I never thought much about scheduled tasks but I can see how it would be nice to have it available.  Actually I thought DSL had something like 'cron' or 'at' in it already.

What's available as a UCI ?  I think there is Python and Tcl. They're not native to DSL but a UCI is pretty light on resources and Python and Tcl are robust languages.  

What would it really need to do?

1. Read a list of dates and tasks
2. Determine if any tasks with a date/time less then the current date/time have not yet been executed.
3. Execute the task
4. mark it as done, so you have an audit trail.
5. go back to #2
6. if no tasks remain go to sleep for a while.

If you want to get fancy:
- add a 4.5 step to create the 'next task' in a recurring tasks ( the every day at 3 am type of tasks ).
- make the list of times and tasks a sqlite table
- create a webpage or some gui interface to enter and view the task list

Sorry, not much help, but the more I think about this, the more I think it could be useful.  Of course maybe it's as easy as pie to install cron and this would just be an exercise in twidling with electrons.

Good luck.  Have you done any internet searches looking for scripts?


--------------
======== Note =========
The DSL Forum Search default is 'OR'
If you search for "cat dog" you will get all "cat" posts and all "dog" posts.
If you search for "cat AND dog" you will only find results that contain BOTH "cat" and "dog"
Add '*' for wildcards, " cat* and dog* "
Back to top
Profile PM 
AwPhuch Offline





Group: Members
Posts: 1404
Joined: April 2004
Posted: Mar. 21 2006,23:55 QUOTE

If you are running a frugal w/ persistant home directory I believe the crontab would be in /home/dsl/etc/crontab I believe

Brian
AwPhuch


--------------
http://www.frappr.com/dsl <-- Where do you use DSL?
http://www.smoothwall.org <-- Ultimate firewall for the world!
http://boinc.mundayweb.com/one/stats.php/userID:6107 <--My BOINC stats!
./S99LinuxRevolution start
Back to top
Profile PM WEB 
11 replies since Mar. 19 2006,14:48 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (3) </ [1] 2 3 >/
reply to topic new topic new poll
Quick Reply: scheduling a task

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code