Adult Script Pro Community Forums

The forum is here for legacy reasons. No new posts will be created. User registration is disabled! If you have any questions, please email us or check https://www.adultscriptpro.com for more details!

You are not logged in.

#1 2010-10-13 01:21:51

Coscast
Member
From: Germany
Registered: 2010-10-03
Posts: 546

Crontab for remvoving Log-Files

Adultscriptpro writes conversion logs to tmp/logs/*

Thats GOOD! Because you can debug!


But if everything works fine and you have got a lot of videos you may want to get rid of those logs, because over time this Directory will consume much Space on your Harddrive.


I did it by setting up a Crontab via the Crond daemon.

This how-to works flawless if you're on Debian.

First login to ssh console
Then type

host371215:~# crontab -e

ENTER


You will see your existing Crons

Add:

@weekly rm /path/to/your/scriptinstallation/tmp/logs/*

Hit CTRL+X

Crontab asks you if you want to change the existing Crontab, you answer yes and hit enter.
Now Crond asks you for the filename, you do nothing but hitting ENTER smile

BÄM! You're done.

Explanation: @weekly means, crontab will delete that directory WEEKLY. It's on Mondays @ 00:01h, thats one Minute after Midnight from Sunday to Monday.

I know that my English is not the best, English is not my native Language.

If you have questions, do not hesitate and ASK.

Only who asks, can be helped ( old german saying )

BTW: Check if Crond is running with

host371215:~# /etc/init.d/cron

the Output should look something like

Usage: /etc/init.d/cron {start|stop|restart|reload|force-reload}.

Last edited by Coscast (2010-10-13 01:26:07)


sgt-halfsize-banner.jpg

Offline

Board footer

Powered by FluxBB