this post was submitted on
81 points (71% like it)
136 up votes 55 down votes
all 174 comments

[–]maniaq 48 points49 points ago*

sorry, this has been archived and can no longer be voted on

well, without going into specific details...

  • wake me up in the mornings
  • check the temperature and turn my heater on/off (there's also a summer script, which depends on a "season" file, also updated by crontab)
  • change the desktop wallpaper every hour
  • clean up security cam files
  • turn lights on at sunset
  • turn lights off if they're still on and it's late (this actually works well as a reminder to go to bed sometimes!)
  • update/optimise MythTV

there's also a superuser crontab for general housekeeping stuff...

(EDIT: most of this was inspired by the guy that was inspired by Jarvis from Iron Man - complete with RFID tags that do other shit, too - I haven't given my system a proper name, yet)

[–]skoh 3 points4 points ago

sorry, this has been archived and can no longer be voted on

How do you connect your machine with your A/C & lights? I've only ever heard of X10, but have little experience in the area.

[–]maniaq 9 points10 points ago*

sorry, this has been archived and can no longer be voted on

yes I use X10 - I had to compile the module myself due to limited linux support (as per usual) but with a usb-dongle plugged in, that talks by RF to a receiver sending control signals to everything using the X10 protocols, my box can control them using stio...

the scripts can be triggered by my IR remote, my RFID tag reader, an Apache web server running my own php code, (naturally) from the command line, or of course by crond...

(EDIT) X10 is actually a very old protocol that is in danger of being obsoleted by Z-Wave - apparently this is more reliable because it uses a wireless control mechanism but, personally, I've found wires to be far more reliable than radio waves - there is (once again, limited) linux support for it, tho

[–]wantonballbag[S] 3 points4 points ago

sorry, this has been archived and can no longer be voted on

check the temperature and turn my heater on/off

Nice. Source for the thermostat used?

turn lights on at sunset

Is this done by hour? Or do you use something more accurate?

[–]maniaq 9 points10 points ago

sorry, this has been archived and can no longer be voted on

Source for the thermostat used?

yeah one day I'll have to get a real thermostat - it checks online for the temperate outside

turn lights on at sunset

Is this done by hour? Or do you use something more accurate?

I have a lookup file with sunrise and sunset times for every day of the year - the same file is used to know when to wake me up in the mornings

[–]wantonballbag[S] 1 point2 points ago

sorry, this has been archived and can no longer be voted on

I have a lookup file with sunrise and sunset times for every day of the year

Awesome. Where did you get this file/how did you make it?

[–]jiphex 6 points7 points ago

sorry, this has been archived and can no longer be voted on

You can use PyEphem to generate this kind of information (also works for any planet, not just Earth, in case you um.... move).

Other than that, you could hook up a light sensor and average the values?

[–]maniaq 1 point2 points ago

sorry, this has been archived and can no longer be voted on

you could hook up a light sensor and average the values?

I actually thought about doing that - I can (do) talk to the webcam with a program called motion and I think I remember reading one of the options you could put into your config file was a command (script to run, for example) when light levels changed by a certain threshold - ie from day to night or vice versa...

(I could be wrong; was a long time ago when I set it up?)

[–]maniaq 1 point2 points ago

sorry, this has been archived and can no longer be voted on

I found a website with the numbers listed in table form - turned the data into a comma-separated text file with a little bash and sed...

[–]wantonballbag[S] 1 point2 points ago

sorry, this has been archived and can no longer be voted on

And the website is...

[–]maniaq 2 points3 points ago

sorry, this has been archived and can no longer be voted on

I can probably find it for you, but unless you live on the East Coast of Australia it probably won't do you any good?

[–]wantonballbag[S] 1 point2 points ago

sorry, this has been archived and can no longer be voted on

So it's not global :/

Never mind I'll find my own. Good idea though.

[–]jdpage 5 points6 points ago

sorry, this has been archived and can no longer be voted on

You can look it up in an almanac, or worst-case, bust out the slide rule and calculate it yourself.

[–]wantonballbag[S] 16 points17 points ago

sorry, this has been archived and can no longer be voted on

bust out the slide rule

"All right bitches, let's calculate some sunsets."

[–]nerdolution 5 points6 points ago*

sorry, this has been archived and can no longer be voted on

it is definitely overkill, but emacs has a "sunrise-sunset" command. works great.

Something like this should do the trick: emacs -no-site-file -batch -q -eval "(require 'solar)" -eval '(progn (setq calendar-latitude 0 calendar-longitude 0 calendar-time-zone 60) (princ (solar-sunrise-sunset-string (calendar-current-date))))'

EDIT: Added the example

[–]Jonno_FTW 2 points3 points ago

sorry, this has been archived and can no longer be voted on

The mathematics around sunrise/ sunset at locations on the earth shouldn't be too difficult to implement.

[–]benburleson 1 point2 points ago

sorry, this has been archived and can no longer be voted on

Google provides this is a public calendar

[–]maniaq 0 points1 point ago

sorry, this has been archived and can no longer be voted on

good to know - tho I have a feelng it might be a little harder for the shell to extract that information from Google (maybe not, I don't know?)

I would actually like to get everything to run offline as much as possible - one of the reasons I extracted the daylight information into a text file - so it all still works even if the internet is not available for some reason - at the moment it just speaks some words of apology if it fails to fetch me some data...

[–]fliphopanonymous 0 points1 point ago

sorry, this has been archived and can no longer be voted on

google calendars can be access as XML files IIRC.

[–]maniaq 0 points1 point ago

sorry, this has been archived and can no longer be voted on

yes I believe you're right!

if I ever lose this information, I'll know where to easily find it...

[–]420is404 0 points1 point ago

sorry, this has been archived and can no longer be voted on

Jumping in, as this is a project I've been meaning to get to for some time (my thermostat has some rather bizzare behavior, and although I could dig out the manual I'd rather automate based on work schedule, my fiancee's, etc). My heat is also distributed amongst two open floors of a 2-flat though, so I'd like to implement routine cycling of the air to make sure the heat keeps evenly distributed. Currently the thermostat is downstairs, so pushing it to 72 on a cold day makes the upstairs ~85.

This is a pretty simple concept to implement (though below it seems like he hasn't yet). Use a serial port to control relays that drive the furnace...or depending on your furnace you may not need a relay at all. Serial/parallel amperage is really low but you may be able to achieve the necessary signal voltages.

Using a thermostat is possible, though to me it seems like a completely unnecessary (and starting at ~$300 for an IP controlled one, expensive!) accessory. If you actually have any interest in implementing this, PM me...thermostats seem to be fairly generic and though I can't find any documentation for signal voltages I'm probably going to break out the multimeter this weekend and get to work.

[–]maniaq 0 points1 point ago

sorry, this has been archived and can no longer be voted on

if you have X10 you have thermostat options there - they're ~ $100 I believe

I haven't actually got around to using one, tho it's on the list... ;)

it's an excellent application for a cron job tho - mine (in the winter) starts at 3AM and every hour, on the hour, for the next four hours, checks the temperature and if it's too cold, it turns on the heater for either 5 or 10 minutes - depending on how low the temperature has fallen

it's a hack - I admit it - but so far this winter (at the risk of temping fate!) it has kept me from waking up with a cold...

[–]dd63584 1 point2 points ago

sorry, this has been archived and can no longer be voted on

May I suggest Lurch?

[–]maniaq 0 points1 point ago

sorry, this has been archived and can no longer be voted on

ha! nice... it actually speaks with a British accent, but still... that's not bad

[–][deleted] 17 points18 points ago

sorry, this has been archived and can no longer be voted on

[–]iamjack 23 points24 points ago

sorry, this has been archived and can no longer be voted on

Author here, glad to see some Canto users in the wild =)

[–]BanjoBilly 0 points1 point ago

sorry, this has been archived and can no longer be voted on

This looks AMAZING. I can't wait to try it out. Do you have any little known Tips & Tricks? How do YOU use this please?

[–]iamjack 0 points1 point ago

sorry, this has been archived and can no longer be voted on

Uhh. Well. I actually don't use it anymore, I use the alpha version I'm developing which, ironically for this post, doesn't use a crontab based fetch (although it could).

Anyway, my only suggestion would be to read the configuration docs. It can basically do anything, if you've got enough Python chops, but for common reader functionality it shouldn't be too difficult to get the hang of.

Especially don't miss the section on filters. I don't think I could use it without filters = [ show_unread ] in my config.

[–]funny_games 3 points4 points ago

sorry, this has been archived and can no longer be voted on

that's pretty hardcore.

[–]noir_lord 113 points114 points ago

sorry, this has been archived and can no longer be voted on

0 0 * * * /home/pinky/brain/take_over_world.py

[–]mavroprovato 51 points52 points ago

sorry, this has been archived and can no longer be voted on

Python comes with a library for EVERYTHING

[–]yonkeltron 39 points40 points ago

sorry, this has been archived and can no longer be voted on

If you did the same thing every night, you'd want to automate it, too!

[–]itaborai83 3 points4 points ago

sorry, this has been archived and can no longer be voted on

His mailbox is probably full of error logs and failed attempts

[–][deleted] 1 point2 points ago

sorry, this has been archived and can no longer be voted on

It'd make for a great cartoon.

[–]muad_dib 0 points1 point ago

sorry, this has been archived and can no longer be voted on

The take_over_world script actually generates a cartoon for you, which humorously shows you the result of the script.

[–]noir_lord 4 points5 points ago

sorry, this has been archived and can no longer be voted on

Nearly everything, it lacks

import tutu

So if you add two tutu's you do NOT get a four-four!

(May have been the biggest pinky and the brain fan in England during it's run)

[–]smok_e_wan_kenobie 13 points14 points ago

sorry, this has been archived and can no longer be voted on

Narf!

[–][deleted] 16 points17 points ago

sorry, this has been archived and can no longer be voted on

0 0 * * * ~/bin/checkrate.sh;

Pulls the latest variable mortgate rate from my lender's website and checks if it has changed since the last check. If it has, it emails me the new rate.

[–]strider1551 14 points15 points ago*

sorry, this has been archived and can no longer be voted on

I'm not sitting at my desktop at the moment, but should be something like:

MAILTO=""
55 02 * * * eix-sync && emerge -uDNf world

It's a Gentoo system, and the above command gets the latest portage tree and downloads the source for any updates. Wake up in the morning, take a quick overview of what the updates are, and let it work while I shower.

[–]fat_chris 3 points4 points ago

sorry, this has been archived and can no longer be voted on

Why not fill the MAILTO in? I like to get it in my inbox, saves extra commands (plus eix-sync output shows more than any emerge command does).

[–]strider1551 8 points9 points ago

sorry, this has been archived and can no longer be voted on

Mindless habit. Back in the day I had something in crontab that never gave output... until one day something stupid happened and it mailed me error stuff... which can be a disconcerting email when you forgot about your crontab and didn't know it could mail in the first place.

Now that I'm looking at what I just wrote, I'm not sure why not getting error messages sounded like a good idea. I guess because I don't use cron for anything critical or capable of messing other things up.

[–]strider1551 -1 points0 points ago

sorry, this has been archived and can no longer be voted on

Mindless habit. Back in the day I had something in crontab that never gave output... until one day something stupid happened and it mailed me error stuff... which can be a disconcerting email when you forgot about your crontab and didn't know it could mail in the first place.

Now that I'm looking at what I just wrote, I'm not sure why not getting error messages sounded like a good idea. I guess because I don't use cron for anything critical or capable of messing other things up.

[–][deleted] 14 points15 points ago

sorry, this has been archived and can no longer be voted on

script that repost imgurs on reddit

[–]AlucardZero 7 points8 points ago

sorry, this has been archived and can no longer be voted on

# m h  dom mon dow   command
@reboot screen -U -a -d -m irssi

[–]nik_doof 2 points3 points ago

sorry, this has been archived and can no longer be voted on

@reboot is by far the most useful shortcut in cron.

[–]Dislexsick 2 points3 points ago

sorry, this has been archived and can no longer be voted on

For the uninformed: What does it do?

[–]vxd 5 points6 points ago

sorry, this has been archived and can no longer be voted on

Can't tell if trolling or not, but it runs the script at boot time

[–]Dislexsick 2 points3 points ago

sorry, this has been archived and can no longer be voted on

Not trolling.. I had just never seen the @ operators before... I don't play with cron much.

[–]nik_doof 3 points4 points ago

sorry, this has been archived and can no longer be voted on

@ are shortcuts, such as @reboot, @daily @monthly, saves having to type in the 5 fields if you just want something small to run at reboot or midnight.

"man 5 crontab" should outline all the options available in your distro's version of cron.

[–]thelastbaron 1 point2 points ago

sorry, this has been archived and can no longer be voted on

What would be the difference between having a @reboot crontab and just having a regular startup script? What would be the advantage?

[–]nik_doof 4 points5 points ago

sorry, this has been archived and can no longer be voted on

Users can use @reboot, whereas startup scripts will need to be added by root or superuser.

[–]tedivm 1 point2 points ago

sorry, this has been archived and can no longer be voted on

I am not even a little surprised.

[–]auxiliary-character 6 points7 points ago

sorry, this has been archived and can no longer be voted on

# I don't have any plans tonight, are you doing anything?

Heh.

[–]wantonballbag[S] 2 points3 points ago

sorry, this has been archived and can no longer be voted on

Hah.

[–]strolls 4 points5 points ago

sorry, this has been archived and can no longer be voted on

Email me an HTML list of all new shows available on the BBC's iPlayer service (excluding categories children's, politics, news, sport, variety shows, Pre-School and Talent Shows) and download anything I've flagged as interesting. Send me another showing films, just in case I missed them in the last 4 days.

# Refresh get_iplayer cache at 45 minutes past every hour
45 * * * *  /usr/local/bin/get_iplayer --type radio --refresh >> /dev/null 2>&1 && /usr/local/bin/get_iplayer --refresh >> /dev/null 2>&1
# Email daily summary of new shows at 8am daily
0 8 * * *   /usr/local/bin/get_iplayer -z "Daily Summary" --email stroller  > /dev/null 
# Email summary of new films at 8am every 4 days
0 8 */4 * * /usr/local/bin/get_iplayer --category films --email stroller  > /dev/null 
# Run PVR download at 2am nightly
0 2 * * *   /usr/local/bin/get_iplayer --pvr --before 24 && echo "Finish time: " ; date

[–]UK-sHaDoW 1 point2 points ago

sorry, this has been archived and can no longer be voted on

Yoink! Mine now.

[–]davidfg4 3 points4 points ago

sorry, this has been archived and can no longer be voted on

I have three lines of rsync backup stuff, and wallpaperChanger.sh which changes my wallpaper to a day or night wallpaper, depending on whether or not it is actually day or night.

[–]element8 2 points3 points ago

sorry, this has been archived and can no longer be voted on

that's pretty nifty, do you have it check someplace to get the official sunset/sunrise times for your area?

[–]davidfg4 2 points3 points ago*

sorry, this has been archived and can no longer be voted on

No, it just looks at the hour. 5 am to 9 pm is a bright daytime background, otherwise it is a night picture of the same scene.

[–]rikbrown 4 points5 points ago

sorry, this has been archived and can no longer be voted on

You should take incremental pictures of the scene every 10 minutes for an hour or so either side of sunset/sunrise, and fade between them slowly.

Get started.

[–]neoice 3 points4 points ago

sorry, this has been archived and can no longer be voted on

the only thing custom I have is:

*/6 *   *   *   *       root    /usr/local/sbin/expire

I have a script that automatically takes and uploads screenshots. I have this set up to expire them every 30mins.

[–]raisinbrain 5 points6 points ago

sorry, this has been archived and can no longer be voted on

Interesting- what do you use it for?

[–]sequentious 6 points7 points ago

sorry, this has been archived and can no longer be voted on

stalking

[–]neoice 1 point2 points ago

sorry, this has been archived and can no longer be voted on

it's basically low-fi screensharing. some of my recent screenshots include: showing Gmail's two-factor login page, dfterm, playing Dwarf Fortress while watching IT Crowd, a sketch of proposed railways over a map of my Minecraft server, some Huffman code diagrams, the output of df -h on 9 shells via cssh.

[–]TheManFromInternet 4 points5 points ago

sorry, this has been archived and can no longer be voted on

I have a series of these:

0 0 * * * updatedb -o /var/lib/mlocate/{something_interesting}.db -U /{something_interesting}/ # JOB_ID_X

These feed a search engine I wrote using CGI because nothing else I have used is faster at finding the stuff I may be looking for over my network file-system. When it runs it uses all four of my cores as it is a pipeline.

[–]eternauta3k 2 points3 points ago

sorry, this has been archived and can no longer be voted on

Used to have a script to download the latest APOD and set it as wallpaper. Now I just set it to run on login.

[–]azashoriu 2 points3 points ago

sorry, this has been archived and can no longer be voted on

what do you set when it is a video?

[–]eternauta3k 3 points4 points ago

sorry, this has been archived and can no longer be voted on

The previous day's picture. Actually downloaded the script off here.

[–]azashoriu 0 points1 point ago

sorry, this has been archived and can no longer be voted on

:), btw, is a good idea

[–]zencyl 8 points9 points ago

sorry, this has been archived and can no longer be voted on

nothing, but i think that is lack of experience and subject to change as i learn more about what i can do with linux.

[–]wantonballbag[S] 1 point2 points ago

sorry, this has been archived and can no longer be voted on

What do you want to do?

[–]zencyl 3 points4 points ago

sorry, this has been archived and can no longer be voted on

thats the million dollar question aint it? I have some friends who are linux ninjas. They have custom terminals and layouts, key bindings and scripts and programs they write and run. Im starting to figure it all out and set it up the way i think i want it. Its been a fun learning experience.

[–]van_Zeller 3 points4 points ago

sorry, this has been archived and can no longer be voted on

Some ideias

  • an alarm clock that plays music of your choosing at a given time. Bonus points if the music fades in;

  • If you have two computers, a script to back up stuff from one to the other;

  • Automate updates at a given time;

This is what I use. I think they are simple, achievable ideas. Let me know if you want to see the actual scripts.

[–]zencyl 0 points1 point ago

sorry, this has been archived and can no longer be voted on

sweet thanks! I have been playing with rsync to a remote machine, i guess i should add that to crontab. The other two ill take a shot at this week and then compare with you. I guess you write the script and then call it from the crontab operation?

[–]ManicQin 2 points3 points ago

sorry, this has been archived and can no longer be voted on

thats the million dollar question aint it

Same here, The problem with Linux is that it gives you an open world of possibilities, but 90% of the time you are looking at them and go "And why would I need that?".

[–]zencyl 2 points3 points ago

sorry, this has been archived and can no longer be voted on

yeah and then when i talk to my friends and they are doing something im always like well what is that?.....Oh you can do that shit?

[–]terremoto 5 points6 points ago*

sorry, this has been archived and can no longer be voted on

Desktop (Debian): 0 2 * * * rsync -av --progress --delete-after /home/jameseric/ /mnt/safe/sinister/linux/home/jameseric/ 0 2 * * * rsync -av --progress --delete-after /mnt/windows/ /mnt/safe/sinister/windows/

Laptop (Cygwin / Windows with a cron application I wrote):

0 0 * * * C:\Cygwin\bin\find.exe 'C:\Users\User\My Downloads' -maxdepth 1 -! -iname desktop.ini -mtime +7 -print -exec rm -rf "{}" ; >> "C:\Users\User\My Downloads\Deleted.txt"

# Clean out the system logs
0 1 %30 * * wevtutil.exe el | sed "s/^\(.*\)/wevtutil.exe cl \"\1\"/" | bash -s

# CCleanr
0 4 * * * "C:\Program Files\CCleaner\CCleaner.exe" /AUTO

# Backup Documents folder hourly on weekends
0 3-1 * * 0,6 C:\Users\User\Configuration\Scripts\Backup.bat 95

# Hourly backups in the early morning and evening
0 6-8,18-1 * * 1-5 C:\Users\User\Configuration\Scripts\Backup.bat 95

# Nightly User directory backup
0 2 * * * C:\Users\User\Configuration\Scripts\Backup.bat

[–]nik_doof 0 points1 point ago

sorry, this has been archived and can no longer be voted on

Cygwin / Windows with a cron application I wrote

You know, Windows does come with the ability to schedule tasks.

[–]terremoto -1 points0 points ago

sorry, this has been archived and can no longer be voted on

And it sucks, too. There are also a few additional things I added; see Difference From Cron on https://github.com/jameseric/automacron

[–]raisinbrain 0 points1 point ago

sorry, this has been archived and can no longer be voted on

Is there a build of anacron for cygwin? You might benefit from that if you are using a laptop, since it allows you to turn off the computer and will execute overdue scripts when you turn it back on

[–]terremoto 0 points1 point ago

sorry, this has been archived and can no longer be voted on

My laptop has a better uptime than my desktop because it acts like a router and I use it as second monitor using Synergy.

[–]adrianmonk 2 points3 points ago

sorry, this has been archived and can no longer be voted on

Thanks for reminding me. I have this:

0 3 * * * /root/bin/run-rdiff-backup.sh

And that reminded me to check on how it's doing. Turns out I've had the external hard drive (target of the backups) turned off since (checks logs...) May 27th. Just turned it back on. Running this now:

echo /root/bin/run-rdiff-backup.sh | sudo batch

[–]keeperofdakeys 2 points3 points ago

sorry, this has been archived and can no longer be voted on

*/15  * * * * root  /usr/userbin/battery_warn.sh

Every 15 minutes check the battery, flash a libnotify message at critical urgency (means it won't disappear) if it is under a certain percentage. At the moment it is 50%, but I'm still playing around with it. I've also got a script in cron.daily that runs updatedb.

[–]hewbert007 2 points3 points ago

sorry, this has been archived and can no longer be voted on

This is neat and all, but why that versus a battery applet with warnings, etc? The custom critical alerts?

[–]keeperofdakeys 4 points5 points ago

sorry, this has been archived and can no longer be voted on

I don't really run anything equivilent to a battery applet or power manager, I have custom scripts that handle it all. Things like brightness and volume use acpid to trigger bash scripts when the brightness/volume keys are hit; it was the only way to make it do exactly what I wanted. This script does EXACTLY what I want, and with the few battery monitors I have tried, they didn't really do what I wanted directly. I'm running awesomewm, so none of those gnome, kde or xfce monitors will work here. Here is a picture of my top-bar, as you can see I have already put a text battery status on there, so a libnotify notification is actually all I need. The other advantage is that it isn't a window, just a small popup in the side of the screen.

[–]hewbert007 2 points3 points ago

sorry, this has been archived and can no longer be voted on

That makes sense then. Thanks for the explanation. I've become so lazy. I haven't used a minimal environment in 5 years or so.

[–][deleted] 2 points3 points ago

sorry, this has been archived and can no longer be voted on

flexget runs every 15 minutes to grab the latest TV shows. i had an rsync running backups every night with my old setup, but since i migrated to a new NAS i haven't set that up yet.

[–]sequentious 2 points3 points ago*

sorry, this has been archived and can no longer be voted on

My user's crontab.

$ crontab -l
# Hardlink maildir at 0400
# My maildir is fetched from google. Due to the peculiar nature of gmail, a single message can be in multiple folders. Therefore, I run freedup to hardlink identical messages together, saving about 500MB.
0 4 * * * timelimit -t240 -T30 freedup -l0 ~/.maildir-chrisirwin/

# Run goobook to fetch contacts
# Google's contact list syncs with my palm and android device, and I use the web interface occasionally, goobook does two-way sync of contacts to google in a mutt accessible interface.
0 4 * * * /usr/local/bin/goobook reload

# Auto-update git-home-repos
# Custom script I wrote to keep my own dotfiles in git repos.
# This checks in and pushes, though it does not auto-merge (yet?)
00 * * * * /usr/bin/home-repos-update >/dev/null 2>&1

# Custom script I've written to tell me if I've scheduled anything today.
# Send out daily agenda on every day but monday
00 04 * * 2-7 /home/chris/.local/bin/mail-gcal-agenda today
# Send out weekly agenda on monday
00 04 * * 1 /home/chris/.local/bin/mail-gcal-agenda week

# Run offlineimap every 5 minutes with a timeout of 4 minutes,
#  and kill after 4:30.
# Don't run between 0400-0500 since we're running hardlink maintenance at that time
# This gives me my gmail in an offline accessible format that I can share between mail clients if I decide to try another (though thunderbird can't use maildir). In practice, I only use mutt currently.
# Script also calls mairix to index mail, some scripts to flush flags from mairix folders back to the original messages, and perform some searches (all unread mail, etc).
*/5 0-3,5-23 * * * timelimit -t240 -T30 /usr/bin/update-maildirs -u Noninteractive.Quiet > /dev/null

# Run podget at midnight & 0600
# Fetches attachments (torrents, mp3, whatever) from RSS feeds.
0 00,06 * * * podget -s > /dev/null 2>&1

The only thing of note in my system crontab is a backup script I wrote to wrap rdiff-backup (for /, /home) and rsync (for bulk storage filesystems).

[–]UnixCurious 1 point2 points ago

sorry, this has been archived and can no longer be voted on

I'd never heard of freedup, pretty nice. Surprised it doesn't appear to be packaged for Ubuntu though (there's a deb on the site but it's not in the official repos).

[–]sequentious 1 point2 points ago

sorry, this has been archived and can no longer be voted on

I've been trying to repackage it in a way that will allow it to be built in a PPA. I've got it building locally with debuild, but it seems to fail on launchpad's build servers. I haven't had a chance to look at it again this weekend.

There is a utility called 'hardlink' I was using until a few weeks ago. For some reason it appeared to miss a lot of messages (only about 1/3rd were hardlinked after a pass). freedup appears to function as intended.

[–]phireal 0 points1 point ago*

sorry, this has been archived and can no longer be voted on

I've just had a go at building it to package it up for SlackBuilds.org, and it fails for me if I run it as a normal user. In my case, it's the tests that the Makefile runs (in Makefile.tests) that are causing it to bomb out. If I run

make DCOL=""

I can get it to pass test 1. After that, it gets to test6, but fails as a normal user as it's trying to chown a file to bin:bin ownership.

If you want to avoid the tests altogether (which may or may not be wise), then

make freedup

instead of just make on its own avoids all the tests. Then, you can just install with

make install

or

make install PRE=/some/packaging/directory

which is easier to package up afterwards, at least for me.

edit: Corrected reasons why it fails.

[–]sequentious 0 points1 point ago

sorry, this has been archived and can no longer be voted on

Yeah, I had trouble with the tests too. debhelper helpfully auto-runs the test targets if present, so I had commented them out of the Makefile (always a wise thing to do...)

For reference, I have it building as a package locally, and I've installed and have been using it as such. It is only failing for me in Launchpad's build system while analyzing dependancies for some reason (possibly building the wrong arch. no idea whats going on there as this was an amd64 build). I didn't have time over the weekend to investigate due to Canada day.

dh_shlibdeps -a
dpkg-shlibdeps: error: couldn't find library libc.so.6 needed by debian/freedup/usr/bin/symharden (ELF format: 'elf32-i386'; RPATH: '').
dpkg-shlibdeps: error: Cannot continue due to the error above.
Note: libraries are not searched in other binary packages that do not have any shlibs or symbols file.
To help dpkg-shlibdeps find private libraries, you might need to set LD_LIBRARY_PATH.
dh_shlibdeps: dpkg-shlibdeps -Tdebian/freedup.substvars debian/freedup/usr/bin/freedup debian/freedup/usr/bin/symharden returned exit code 2
make: *** [binary-arch] Error 9
dpkg-buildpackage: error: /usr/bin/fakeroot debian/rules binary-arch gave error exit status 2

[–]Croooow 0 points1 point ago

sorry, this has been archived and can no longer be voted on

Synchronization with mairix piques my curiousity.

[–]sequentious 1 point2 points ago

sorry, this has been archived and can no longer be voted on

Scripts are here.

  • update-maildirs

Wraps all of the below, plus offlineimap. Allows me to have it all run at once via crontab.

  • update-mairix-flags

When given a mairix maildir, will back-trace to set flags (read, etc). I didn't write most of this, but I did modify it a fair bit.

  • update-mairix-flags-all

Hackish script to list any maildirs in my mairix search folder, then call update-mairix-flags on it.

  • update-mairix-searches

Runs ~/.mairix-searches, then builds a mutt mailbox list containing any maildirs found within the mairix search folder.

[–]graycode 2 points3 points ago

sorry, this has been archived and can no longer be voted on

*/5 * * * * ~/bin/traffic_alert.sh

Scrapes the latest travel times from state dept. of transportation's website for the route I take home from work, runs some analysis on the recent data, and sends me an email right before it thinks the traffic is about to get totally fucked up, so I know when to leave. :)

Also accumulates the data into a big .csv file which I can generate graphs from, in order to improve its analysis.

[–]kukulkan 2 points3 points ago

sorry, this has been archived and can no longer be voted on

If you have never heard of it, I highly recommend checking out cronic. It's a simple cron wrapper that gives you the best of both worlds. It parses for error output, if there is none it does nothing, if errors occur it will email you. It's a great solution to dev nulling everything.

[–]ummmmm 1 point2 points ago

sorry, this has been archived and can no longer be voted on

5 0 * * * /root/dbbackup.sh

I have my website database backed up every night and scp it to another server where Dropbox is installed.

[–][deleted] -1 points0 points ago

sorry, this has been archived and can no longer be voted on

I hope your backup's encrypted, or the data itself is worthless. With the latest ToS modifications by the Dropbox team, your data basically belongs to them.

[–]HopeThisNameFi 6 points7 points ago

sorry, this has been archived and can no longer be voted on

I don't care if you use Dropbox or any other backup provider, I would encrypt it regardless. It's one extra line in your script.

[–]dordy 5 points6 points ago

sorry, this has been archived and can no longer be voted on

It doesn't belong to them. However the TOS grants them a non-exclusive in perpetuity copyright to your material as needed to provide their "service".

[–]klaruz 1 point2 points ago

sorry, this has been archived and can no longer be voted on

30 years ago it was legally questionable to load a program into memory to run it. Don't hate the player.

[–]Sofakingjewish 0 points1 point ago

sorry, this has been archived and can no longer be voted on

True and also encryption. http://en.wikipedia.org/wiki/CoCom

[–]wantonballbag[S] 2 points3 points ago

sorry, this has been archived and can no longer be voted on

With the latest ToS modifications by the Dropbox team, your data basically belongs to them.

I hope this isn't hyperbole. That would be tedious.

[–]Sofakingjewish -2 points-1 points ago

sorry, this has been archived and can no longer be voted on

Please stop spreding knee-jerk FUD. Then you better quit using google, MSFT, yahoo, flikr, or pretty much another company whose online service you use as they all have similar terms of service. It isn't for stealling all your bumps in the stack. It is so they can serve up any kind of personal media you have. You see you have to give them permission to serve up your stuff. As it is assumed you, the owner of the media (copyright) holder, have to grant them some kind of right/license to do so legally speaking. It is strictly a mere legality, needed in today's world (for better or worse).

Although best practice would be to encrypt your shits.

[–]bincat -1 points0 points ago

sorry, this has been archived and can no longer be voted on

It may look like a mere legality but I'd argue that these kinds of broad terms of service agreements are not needed. They could be much more restrictive.

[–]Sofakingjewish 0 points1 point ago

sorry, this has been archived and can no longer be voted on

unfortunately they are. you, I and others are not powerless. We dont have to use third party online storage. I personally use an Amahi server, with the eyeOS app and CrashPlan among others. I use my crontab with rsync to back up my Amahi server. I also use clonezilla as a back to my back Just in case.

[–]jangovich 1 point2 points ago

sorry, this has been archived and can no longer be voted on

59 23 * * * /root/bckp.sh

only appeared there a few days ago though... finally (:

[–][deleted] ago

sorry, this has been archived and can no longer be voted on

[deleted]

[–]jangovich 0 points1 point ago

sorry, this has been archived and can no longer be voted on

going to the script and seeing rsync commands will probably reveal the purpose of the script anyway, even if I call it xzvudf.sh

[–]azashoriu 1 point2 points ago

sorry, this has been archived and can no longer be voted on

*/1 * * * * /home/aza/bin/afraid_up
*/5 * * * * /usr/bin/php /srv/http/cacti/poller.php > /dev/null 2>&1
*/15 * * * * /usr/bin/getmail -rgetmailrc-all
22 00 * * 0 /bin/rm /var/local/dumps/*
02 00 * * * /home/aza/bin/gitstats/gitstats /srv/http/git/projects.git/ /srv/http/gitstat/projects/
15 00 * * * /bin/tar cvjf /mnt/data/backups/git/repos/projects.git_`date "+%d%m%Y"`.tar.bz2 /srv/http/git/projects.git/
10 00 * * * /usr/bin/find /mnt/data/backups/git/repos/ -iname 'projects*.tar.bz2' -mtime +7 -exec rm -v {} \;
30 00 * * * /home/aza/bin/ssync
02 00 * * * /bin/sh /srv/http/stats/updatestat.sh > /dev/null
02 00 * * * /usr/local/sbin/squid-graph --no-console-log --cumulative --output-dir=/srv/http/squid-graph < /var/log/squid/access.log

[–]capncanuck 5 points6 points ago

sorry, this has been archived and can no longer be voted on

Protip: put PATH=/home/aza/bin:/usr/bin:/bin:/usr/local/sbin on the firstline of your crontab. See other posts as examples.

[–]capncanuck 0 points1 point ago

sorry, this has been archived and can no longer be voted on

any reason why you use */1 instead of just * ?

[–]rschlaikjer 1 point2 points ago

sorry, this has been archived and can no longer be voted on

0 * * * * /usr/local/bin/lifereabackup

Since I store the cache for my RSS reader in a ramdisk to prevent my HDD from being hammered (liferea copes terribly with a large number of feeds), I need a script to copy the contents of the ramdisk to disk every now and again.

0 0 1 * * /bin/bash -c 'echo "It has been a month since the last backup." | mailx -s "Time for a backup" ross' 

Remind me with an email to connect up my backup drive and sync everything.

[–]capncanuck 1 point2 points ago

sorry, this has been archived and can no longer be voted on

src please? I use liferea as well and I need your script.

I'm sure it could just be a one-liner.

[–]rschlaikjer 2 points3 points ago

sorry, this has been archived and can no longer be voted on

To load it to ram on startup, I added the following to /etc/rc.local: mkdir /dev/shm/liferea/ cp -r /home/ross/.liferea-bk/* /dev/shm/liferea/ chown -R ross /dev/shm/liferea The backup script is just a one liner; I have it run every hour from crontab but also at shutdown by having a link in /etc/rc{0,6}.d/ cp -r /dev/shm/liferea/* /home/ross/.liferea-bk/ Then just have ~/.liferea_1.7 be a symlink to /dev/shm/liferea

[–]capncanuck 0 points1 point ago

sorry, this has been archived and can no longer be voted on

Excellent, the feeds update very quickly

[–]Darkmere 1 point2 points ago

sorry, this has been archived and can no longer be voted on

I just use libunsync() for liferea, a basically making fsync, fdatasync and msync be null operations.

The main reason liferea copes so badly is that it causes a ton of data syncs to disk, if you tell it to go for the cache, it's actually quite snappy.

[–]wantonballbag[S] 0 points1 point ago

sorry, this has been archived and can no longer be voted on

Could you post your feedlist?

[–]MarcusHauss 1 point2 points ago

sorry, this has been archived and can no longer be voted on

@hourly sh /Users/marcushauss/Documents/Cronjobs/Minecraft_cron_job.command >/dev/null 2>&1 @hourly sh /Users/marcushauss/Documents/Cronjobs/Notational_data_dropbox_backup.command >/dev/null 2>&1

Background: MC has a bottleneck with IO, so i moved the savegames, make a ramdisk, load the files there and make a symbolic from the minecraft folder to the ramdisk, so i keep an hourly rsync to another folder, everytime it runs it alers me via growl.

The second one is the same as the first one only that i backups to dropbox instead of my own hdd.

I already have my own shell apps for making, mounting and restoring from backup plus demounting, deleting and backuping a ramdisk, i just need to interconnect them and also backup to dropbox.

[–]mathboy0 1 point2 points ago

sorry, this has been archived and can no longer be voted on

Lots of stuff automatically installed by Ubuntu, plus: - my daily backup script, which exports my package selections and some other stuff into a file in Dropbox for easy recovery. - daily apt update and upgrade, because for whatever reason the options in the system give you no option to have it automatically install all upgrades.

[–]nandhp 1 point2 points ago

sorry, this has been archived and can no longer be voted on

57 2,5,8,11,14,17,20,23 * * * sh -c 'blah/blah/blah/fetch-jwz-org.sh > /dev/null 2>&1'

If you're unaware, Jamie Zawinski has a puzzle on his home page. It changes regularly, so this saves a copy. I found the secret, but I won't give you a hint either (perhaps I should consider stopping this use of his bandwidth).

57 19 * * * sh -c 'blah/blah/blah/update-rfcs.sh > /dev/null'

I plan for Internet outages. My laptop has dumps of Wikipedia (which I view with wikipediaDumpReader; 6G), OpenStreetMap (preformatted for use with Navit; 3.1G), and all the IETF RFCs (just in case; a measly 350M). This script uses rsync to update the RFCs.

57 0,3,6,9,12,15,18,21 * * * sh -c 'blah/blah/blah/encfs-mail-backup.sh > /dev/null'

I also use mbsync to back up my Gmail account. I encrypt the backup using encfs.

[–]wantonballbag[S] 2 points3 points ago

sorry, this has been archived and can no longer be voted on

I found the secret

Is it an actual secret, something of worth? Or does it just say something like "Don't forget to drink your Ovaltine?"

[–]nandhp 0 points1 point ago

sorry, this has been archived and can no longer be voted on

It's not just a lame subliminal message. It's actual mildly interesting content.

[–]AaronOpfer 1 point2 points ago*

sorry, this has been archived and can no longer be voted on

0 */8  *   *   *             /usr/sbin/cron-apt
0 */8  *   *   *             /etc/update_squid_adblock.sh
0  0   *   *   6             /etc/backup_to_nas.sh
0  0   *   *   *             rm -rf /home/dump/* && echo 'This directory is emptied daily at midnight' > /home/dump/WARNING.txt
55 7   *   *   1,2,3,4,5     /usr/local/bin/screen-on
25 16  *   *   *             /usr/local/bin/screen-off
*/1  *   *   *   *             /usr/local/sbin/verify_stream_svcs.sh

Cron-APT automatically downloads updates so that I can install them quickly once I review them. Very handy!

The squid adblock and NAS backup scripts are self explanatory...

I have a samba share that is writeable by all as a "flash drive" replacement for transferring files around the office between computers.

Screen on and off controls what times my workplace's kiosk screen is on and off with xset. Sadly there's some bug on Debian 6.0 that makes the screen turn itself back on again. Any ideas?

And Verify_stream_svcs.sh used to make sure that our internet radio stream used for hold music was still working, but now we use locally stored royality-free MP3s so that entry probably is no longer necessary.

[–]wastholm 1 point2 points ago

sorry, this has been archived and can no longer be voted on

  • Getting screenshots from various news sites (including Reddit) for use in my slide show screensaver.
  • Listing the names and versions of all installed packages and storing an alphabetized list in a file under /etc.
  • Automatically committing any uncommitted changes in the /etc tree to a Subversion repository.

[–][deleted] 0 points1 point ago

sorry, this has been archived and can no longer be voted on

How do you do the first one?

[–]wastholm 0 points1 point ago

sorry, this has been archived and can no longer be voted on

python-webkit2png. I think I may have gotten it from here: https://github.com/ypcs/python-webkit2png

[–]akranis 1 point2 points ago

sorry, this has been archived and can no longer be voted on

I don't have anything set up in the crontab of my desktop machines. But on my server I have it set up so that bashpodder fetches new episodes at midnight.

I also have SpiderOak run every ten minutes in batchmode.

[–]msp3k 1 point2 points ago

sorry, this has been archived and can no longer be voted on

  • scrape-redit-for-popular-posts-and-then-repost.py
  • download-4chan-and-post-to-redit.sh
  • automated-anonymous-targeting-and-hacking.pl
  • i-dont-always-automate-but-when-i-do-i-generate-tired-memes.py
  • robo-karma-whoring.py

[–]274Below 0 points1 point ago

sorry, this has been archived and can no longer be voted on

Well, root has two entries: 20 3 */3 * * su src -s /bin/bash --session-command="~src/repack.sh" 17 0 * * * su src -s /bin/bash --session-command="~src/update-all.sh"

These are simply there to update multiple git/svn repos that I use frequently. The 'src' user has a shell of /usr/bin/git-shell which prevents it from executing pretty much anything, so the workaround is to execute a proper shell via su from root.

The minecraft user has several relevant entries in there: # restart on reboot @reboot ~/scripts/startme

# backups
*/15 * * * * ~/scripts/backup-execute
2 4 * * * ~/scripts/backup-cleanup

# map update + upload
5 * * * * ~/scripts/map-update 1>/dev/null

The first entry should be self explanatory. The backup entries are rsync hard-link based backups, and include communication with the minecraft server to prevent autosaving while the backup is running (and then restarts autosaving once complete). The cleanup is a simple find that removes all backups older than X many days. The very last entry should be self explanatory as well. These scripts actually work on two servers, not one, and include locks to prevent long running jobs from being attempted twice at once.

I may wind up converting these scripts to be run from the root user with the above su magic and giving minecraft a /sbin/nologin shell, just in case.

I also have this one-liner for 'bt': @reboot ~/startme

... which faithfully starts rtorrent in a looping screen session on reboot.

[–]rabel 0 points1 point ago

sorry, this has been archived and can no longer be voted on

0 9 * * * ~/check_payroll.sh 

Reads a little file with payroll dates and sends an e-mail 4 days prior to payroll to my crappy consulting company asking them if there's any problems with my payroll check.

After the 3rd time of checking my bank account for the amount of my latest paycheck only to find that it wasn't auto-deposited for whatever reason, I've had to take things into my own hands. They refuse to let me know if I'm not going to get paid because the client forgot to authorize my timesheet or whatever. It's never anything serious or hard to fix, but they just absolutely refuse to let me know if something happened and I won't be getting paid. Mind you my timesheet is due 2 weeks prior to payroll so there's plenty of time to fix any issues... if they would let me know there was a problem.

[–]pilkch 0 points1 point ago

sorry, this has been archived and can no longer be voted on

[–]andersonmanly 0 points1 point ago

sorry, this has been archived and can no longer be voted on

0 8 * * *       /root/scripts/system_check/daily_status.sh > /dev/null 2>&1

E-mails me the status of the server every morning at 0800. Includes things like the disk usage, internal temperature of the system/drives, up-time (551 days!) and load, raid status, snapshot usage, etc.

[–]slaney 1 point2 points ago

sorry, this has been archived and can no longer be voted on

This is a common system administration anti-pattern. You should only get notifications for failure states, and actionable warning states. Bombarding yourself with emails telling you that everything is good is not an efficient use of your time.

[–]andersonmanly 0 points1 point ago

sorry, this has been archived and can no longer be voted on

I disagree. While, yes, I do skip over most of it, seeing things like this allows me to better pick up on hardware trends. I've found it handy on more than one occassion to go back in a few emails and notice a difference in hardware temperature.

[–]slaney 1 point2 points ago

sorry, this has been archived and can no longer be voted on

Email is not a trending tool. I take it this is a home hobby set up?

[–]andersonmanly 0 points1 point ago

sorry, this has been archived and can no longer be voted on

Yes, but I also use a similar script on my work servers. Make best with what I got, ya know?

[–]nik_doof 0 points1 point ago

sorry, this has been archived and can no longer be voted on

How many of them do you actually read?

[–]eleventysw 0 points1 point ago

sorry, this has been archived and can no longer be voted on

Would you mind sharing the script you use? I've been thinking about setting up something similar but have near no knowledge of shell scripting.

[–]slaney 0 points1 point ago

sorry, this has been archived and can no longer be voted on

This is a common system administration anti-pattern. You should only get notifications for failure states, and actionable warning states. Bombarding yourself with emails telling you that everything is good is not an efficient use of your time.

[–]acphilly 0 points1 point ago

sorry, this has been archived and can no longer be voted on

nothing. i started using jenkins so i know if a cron run fails and if so why.

[–]apollotiger 0 points1 point ago

sorry, this has been archived and can no longer be voted on

0 6 * * * /usr/local/bin/sa-learn --ham $HOME/mail/inbox
30 6 * * * /usr/local/bin/sa-learn --spam $HOME/mail/uncaught-spam

Not too interesting, I’m afraid.

[–]Centropomus 0 points1 point ago

sorry, this has been archived and can no longer be voted on

0 * * * * /home/me/bin/run_queries.py

Because I'm way too lazy to set up django or something like that to run expensive queries asynchronously and cache the results.

[–]the_merk 0 points1 point ago

sorry, this has been archived and can no longer be voted on

a script to send an easily filtered email to the email account linked to my gmail.

gmail checks your pop mailboxes based on the amount of mail it pulled in the last x number of checks. so if you don't get a lot of mail for a period, it will check like once an hour. if you want a centralized email box, that's irritating. so i send an email a minute from my linux box to emailA, which gets picked up by emailB@gmail, which is filtered immediately to trash. then like once a month i apply a filter to emailA.

[–]minhajuddin 0 points1 point ago

sorry, this has been archived and can no longer be voted on

* * * * * /bin/bash -i -l -c 'dnotify' > /tmp/dnotify.log 2>&1\n

It uses a gem called dnotify to show me passive reminders using libnotify.

[–]Buckwheat469 0 points1 point ago

sorry, this has been archived and can no longer be voted on

*/2 * * * * php "/home/user/Videos/Security Cameras/sync.php"

Syncs security camera video to a Dropbox folder every 2 minutes. Dropbox then syncs the folder. The script will make sure there's only enough files to fill the space (5MB per video, 2G max, about 375 videos should suffice). It makes sure that if anyone steals my computer I will have at least a video of them doing it on the internet.

Here's the synchronization code.

[–]shadyjim 0 points1 point ago

sorry, this has been archived and can no longer be voted on

00 10 * * * /usr/bin/gitpulls.sh

Script pulls all websites to their latest versions from Github at 10AM every morning.

[–]holgerschurig 1 point2 points ago*

sorry, this has been archived and can no longer be voted on

Make that /usr/local/local/gitpulls.sh and I'm on your side :-)

Edit: i mistyped /usr/bin/local/gitpulls.sh originally

[–]pavpanchekha 3 points4 points ago

sorry, this has been archived and can no longer be voted on

/usr/local/bin/gitpulls.sh, perhaps?

[–]holgerschurig 0 points1 point ago

sorry, this has been archived and can no longer be voted on

Sure, I mistyped :-(

[–]guyht 1 point2 points ago

sorry, this has been archived and can no longer be voted on

This is super dangerous and a big security risk imo

[–]shadyjim 0 points1 point ago

sorry, this has been archived and can no longer be voted on

I should have mentioned they're all private repos at Github.

Nevertheless, it's the easiest auto deploy I've had.

[–]guyht 0 points1 point ago

sorry, this has been archived and can no longer be voted on

Ah, private repos would be ok I guess

[–]shaurz 0 points1 point ago

sorry, this has been archived and can no longer be voted on

Nothing on my main PC. File server has a daily backup script.

[–]noisesmith 0 points1 point ago

sorry, this has been archived and can no longer be voted on

Touch a file on my stupid Toshiba 1tb external drive once every minute so the drive doesn't fall asleep (asleep in a way that it can only be woken manually - buggy firmware).

[–][deleted] 0 points1 point ago

sorry, this has been archived and can no longer be voted on

Any reason something like hdparm -B 255 /dev/hdwhatever wouldn't work?

[–]noisesmith 0 points1 point ago

sorry, this has been archived and can no longer be voted on

The firmware is messed up and the power management won't turn off, even Windows users need to use automated tasks to keep the drive awake.

HDIO_DRIVE_CMD failed: Input/output error

[–]chka 0 points1 point ago

sorry, this has been archived and can no longer be voted on

Shell scripts for a basic smart folder thing for my Samba server with Added last week, ...last month, and so on.

If anyone knows how to do "smart folders" in a better way, let me know!

[–]turing_inequivalent 0 points1 point ago

sorry, this has been archived and can no longer be voted on

@daily  ID=backup-home ~/Scripts/daily-backup.sh

A script that backups my home and also saves a list of all the files, in case something goes terribly wrong.

[–]deusnefum 0 points1 point ago

sorry, this has been archived and can no longer be voted on

This is on my router/firewall/server. I don't think I have anything running on my desktop

[root@helium ~]# ls /etc/cron /etc/cron.d:

/etc/cron.daily: logrotate man-db shadow

/etc/cron.hourly: adjtime connection_check.sh

/etc/cron.monthly:

/etc/cron.weekly: squid

check_connection.sh is a hacky little script that restarts the network and a few other things if the network goes down. My internet connection has become remarkably robust since I implemented that script.

[–]sekh60 0 points1 point ago

sorry, this has been archived and can no longer be voted on

0 0 1 * * echo repair >> /sys/block/md4/md/sync_action >>/root/scrub-log.txt

[–]sebnukem 0 points1 point ago

sorry, this has been archived and can no longer be voted on

rsync command to mirror the latest fedora-update yum repository to my home server every night at 2 am. yum updates are ridiculously fast.

[–]tmahmood 0 points1 point ago

sorry, this has been archived and can no longer be voted on

okay, I have a crazy one ... As I do not have outside access of my main workstations, I have a small cron script running that checks a folder for files and execute them and save the results in a log file.

This folder is synced with dropbox. With this now I can write up a simple executable file and put , which will get execute each hour and do some stuffs on my main workstation. no root access. Simple :)

[–][deleted] 0 points1 point ago

sorry, this has been archived and can no longer be voted on

Given Dropbox's record with security, that seems like a terrible idea.

[–]tmahmood 0 points1 point ago

sorry, this has been archived and can no longer be voted on

probably ... but it does what I need right now.

[–]LiveMaI 0 points1 point ago

sorry, this has been archived and can no longer be voted on

There's a kernel bug with my LAN chipset that disables the wake-on-lan capability every time the system boots, so I have:

@reboot /sbin/ethtool -s eth0 wol g

in order to get around that.

[–]Croooow -1 points0 points ago

sorry, this has been archived and can no longer be voted on

crontab: # m h dom mon dow user command 7 * * * * { test -d $HOME/.cron.hourly && cd $HOME; } && run-parts --report $HOME/.cron.hourly 03 7 * * * test -r $HOME/.anacrontab && /usr/sbin/anacron -s -t $HOME/.anacrontab -S $HOME/.cache/anacron # retrieve remote mail every 15 min. 8,23,38,53 * * * * test -x $HOME/.getmail/run-getmail && $HOME/.getmail/run-getmail --quiet

~/.anacrontab: # ~/.anacrontab: user configuration file for anacron

# See anacron(8) and anacrontab(5) for details.

1   5   cron.daily   cd $HOME && nice run-parts --report $HOME/.cron.daily
7   10  cron.weekly  cd $HOME && nice run-parts --report $HOME/.cron.weekly
@monthly    15  cron.monthly cd $HOME && nice run-parts --report $HOME/.cron.monthly

Then I throw scripts into the appropriate directories for hourly, daily, weekly, and monthly jobs.

[–]nik_doof -1 points0 points ago*

sorry, this has been archived and can no longer be voted on

Mine allows for my vcs home system to work nicely, each vcs component can place files in the required folders to execute scripts as needed. run-parts is a commonly used script in Debian, not sure about other distros.

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin:$HOME/bin

# run-parts
01 * * * * run-parts $HOME/.crontab/hourly
02 4 * * * run-parts $HOME/.crontab/daily
22 4 * * 0 run-parts $HOME/.crontab/weekly
42 4 1 * * run-parts $HOME/.crontab/monthly
@reboot    run-parts $HOME/.crontab/reboot