[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: howto start something 5 mins after boot



On Sun, Apr 30, 2006 at 05:08:26PM -0500, Mumia W wrote:
>Hugo Vanwoerkom wrote:
>>Hi,
>>With crontab you can start things any time or day, but not in a relative way, 
>>e.g. 5 minutes after boot run a script.
>>How would you do that?
>>Thanks!
>>H
>
>You could create a bootscript that uses the "at" command, like so;
>
>/etc/init.d/mybootinit:
>echo myscript | at now + 5 minutes
>
>Of course you'd use update-rc.d to set the runlevels you want
>mybootinit to start in.

You could also use cron to do that:

 @reboot echo myscript | at now + 5 minutes

(Untested, so no guarantees :-)

/M

-- 
Magnus Therning                    (OpenPGP: 0xAB4DFBA4)
magnus@therning.org
http://therning.org/magnus

Software is not manufactured, it is something you write and publish.
Keep Europe free from software patents, we do not want censorship
by patent law on written works.

They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety.
     -- Benjamin Franklin, Historical Review of Pennsylvania, 1759

Attachment: pgpPaNinjVSY2.pgp
Description: PGP signature


Reply to: