how-to for crontab

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

how-to for crontab

Postby permitivity » Mon Oct 14, 2013 5:34 am

I see the crontab commands. I wanted to add a cronjob to restart the Pogoplug at 5AM every day. But I'm not sure which buttons to push to save the command.

First, this is the command that I think will make it restart at 5AM daily. Please correct me if I'm wrong.

$this->bbcode_second_pass_code('', '00 05 * * * /usr/bin/reboot')

But when I type in "crontab -e" to edit, I was expecting something like a nano window to edit text commands. Instead, I get a window that looks like this:

$this->bbcode_second_pass_code('', '
~
~
~
~
~
~
"/tmp/crontab.b75pJC" 0 lines, 0 characters

')

I can't type anything in. Do I need to do a special ctrl command to start typing in crontab? I obviously have no idea what I'm doing here. There's lots of info about how to write the command, but they seem to assume you know what you're doing in Linux :)
permitivity
 
Posts: 141
Joined: Mon Feb 18, 2013 3:08 am

Re: how-to for crontab

Postby moonman » Mon Oct 14, 2013 7:13 am

the crontab line seems right.
By default vi is the editor. It is a little more complicated to use it. To use nano

$this->bbcode_second_pass_code('', 'export EDITOR=nano
crontab -e')

Add the export line to /etc/profile to make it default
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am


Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 9 guests