automated processes - crontab

gggabcsi

Inactive User
Joined
Nov 16, 2012
Messages
6
Reaction score
0
Start SSH if is not already running (Bluepanel -> Extras -> Services/Daemons)

Login with SSH to your box

Check if crontab is in place
# ls -l /bin/crontab
lrwxrwxrwx 1 root root 7 Dec 17 22:56 /bin/crontab -> busybox

Check if crond is in place
# ls -l /sbin/crond
lrwxrwxrwx 1 root root 14 Dec 17 22:56 /sbin/crond -> ../bin/busybox

Check if startup script is in place
# ls -l /var/script/crond_script.sh
-rwxr-xr-x 1 root root 695 Jan 19 00:14 /var/script/crond_script.sh

Create missing directories
mkdir /var/spool
mkdir /var/spool/cron
mkdir /var/spool/cron/crontabs
mkdir /var/etc/cron

Create missing links
cd /var/etc/cron
ln -s /var/spool/cron/crontabs crontabs

Start crond via Bluepanel -> Extras -> Services/Daemons

If the status is 'not running', something gone wrong, please check all the steps again

Start the cron editor with
# crontab -e
and schedule your jobs
 
Here is the example on Gemini Images
--
look at /var/script ..there is a crond_script.sh

edit like this

CROND_ON=1

then

make folders in var/etc/

named cron,and inside 1 more named crontabs

it have to look like this
/var/etc/cron/crontabs/

put file named "root" whit this

# +---------------- minute (0 - 59)
# | +------------- hour (0 - 23)
# | | +---------- day of month (1 - 31)
# | | | +------- month (1 - 12)
# | | | | +---- day of week (0 - 7) (Sunday=0 or 7)
# | | | | |
# * * * * * command to be executed
# ------------------------------------------------------------------
* 4 * * * reboot > /dev/null 2>&1 &

thats all ...reboot u dreambox!

u have restart every day at 4am!
 
Back
Top