![]() |
Re: cron anyone?
I tried the following crontab:
Code:
* * * * * root run-parts /1 Code:
#!/bin/sh Code:
#!/bin/sh HTH, Dre |
Re: cron anyone?
You were right about the username thing. I took out root and it works fine now. crontab syntax was rusty to the max I guess. thanks for the port and for the help.
Code:
20 * * * * run-parts /etc/cron.hourly |
Re: cron anyone?
No problem :-)
Next up will be a utility to automatically connect to an available WIFI network. Powered by cron, obviously! PS: Your syntax seems to have been correct, at least for some versions of cron. But maybe not for this one. |
Re: cron anyone?
I'm a little unclear on this. Will cron wake up an N800 that has gone into sleep mode? Will your example of touching a file every minute prevent an N800 from going into sleep mode?
|
Re: cron anyone?
Although it keeps running in the background (i.e., it still executes what it has to execute), cron does not wake up my 770. I don't have an N800 so I can't say, sorry!
|
Re: cron anyone?
Quote:
I need something to automatically sync a couple directories with my desktop machine as long as my 770 is already connected to my home network. It needs iwconfig to get the essid of the current network, but then it's pretty straightforward from there. An alternate mode would be to connect to any available network in range and sync to the home machine from an external address. |
Re: cron anyone?
Ideally, I could just patch grsync to give it a command-line mode that would sync a particular setup from its config file every now and then with cron. Not a lot of time in the next couple weeks though...
|
Re: cron anyone?
What I could (try to) write is a program that connects to any available WIFI connection (this part is done) and then executes a shell script (this part should be easy to do), passing to it the ESSID of the WLAN via a command argument. If the syncing that you require can be done via the shell, then you can write it up as a script.
The only thing I'm not sure of currently (and I can't check this until this evening) is the following. The WLAN connection drops a few seconds after the program that initiated it quits. If that program forks a process (shell script) and waits for it to terminate before quitting, then I am hopeful that the connection will be kept alive until the quitting of the main program (does this sentence even make sense?). HTH, Dre |
Re: cron anyone?
Here it is (direct link to the binary): http://www.anomaly-music.com/crun/crun
Copy this file to your /usr/bin/ folder and chmod it to be executable (by root I guess), then call it from the crontab, or the command line if so desired. Syntax is: Code:
crun <program> [arguments] Code:
crun wget google.com/index.html I don't have time to write a README file, so please forgive me on this note. PS: crun = connect/run --- DISCLAIMER: I am not responsible if your Internet Tablet stops working, gets bricked, collapses to a singularity, or gets attacked by a pack of rabid goats. |
Re: cron anyone?
sweet. What does it do if it's already connected to a wifi network?
|
All times are GMT. The time now is 23:53. |
vBulletin® Version 3.8.8