Tag Info

New answers tagged

0

Cron doesn't have access to your X session, by design. You should probably run this in a background loop from your .xsession or similar instead.


0

Some times there is need to rsync without ssh involved, especially if rsync is running as a server on one side. In this case I wrote instructions, how to give rsync password from command line. This is very good for scripting: rsync-without-prompt-for-password


1

I haven't used it personally, but Cronnix may be the tool that you're looking for. Alternately, considering that your goal is 'to "soften" the move from the GUI to the terminal', you could use: http://www.corntab.com/pages/crontab-gui to both help teach the basics of cron and to ease the transition to the CLI. It uses a graphical web interface to ...


0

I think I found an answer to my question. The issue was tricky because "the newer Cron versions of Linux may run abit differently than in older versions" to what I was used to. It seems now Cron consists of the script usr/lib/cron/run-crons, which checks whether cron.dayly in /var/spool/cron/lastrun/ is older than one day (By default it checks if it is more ...


0

logrotate runs either when time period is given weekly, daily and so on, or in the case of size when filesize exeeds the given size. Just put there size=2, instead of size=+2, and it should work. size size Log files are rotated when they grow bigger then size bytes. If size is followed by M, the size if assumed to be in megabytes. If the k ...


0

Also, be sure that mysqldump is in the $PATH when running from cron. A best practice is to set $PATH directly in your script, or to specify full paths to any commands that are invoked (e.g., /usr/bin/mysqldump).


1

Excellent answer from palswim. (Also, thanks for the upvote for those last two points needed to be able to upvote myself!) The cp -rl ; rm sorts out the issue and with minimal I/O (cp and rsync are stupidly expensive in that regard). There are two minor issues with it: it is not 100% atomic - it takes two I/O operations (this applies to the rsync method ...


-1

I think if you run crontab -e as zuusu and add your cron job line in there it should work.


1

According to crontab man page (man 5 crontab) if you set variables, those will be environment variables (which is fine as long as you don't overwrite other environment variables) the value of such a variable is NOT parsed, substitutions will NOT work So you can define AUTH, BASE_URL but you cannot define COMMAND_OLDB which is based on other variables, ...



Top 50 recent answers are included