Tag Info

Hot answers tagged

2

No. From man logrotate: Each configuration file can set global options (local definitions override global ones, and later definitions override earlier ones) So, yes. Again, from the manpage: hourly Log files are rotated every hour. Note that usually logrotate is configured to be run by cron daily. You have to change this ...


2

The manpage (man 5 crontab) says: The entire command portion of the line, up to a newline or % character, will be executed by /bin/sh or by the shell specified in the SHELL variable of the crontab file. Percent-signs (%) in the command, unless escaped with backslash (), will be changed into newline characters, and all data after the ...


1

When you are in the directory ~/test/basic_unix and invoke your script, your mkdir "$createdep" command creates that folder in ~/test/basic_unix because that's the current directory, that's where you ran the script from. However, when you run that script from cron, the directory you start with is your home directory, ~, so your mkdir command creates the ...


1

Cron usually needs a full file path try using 0 1 * * * /sbin/reboot instead


1

As indicated by other answers, the result depends on whether anacron is installed. On a desktop, it is installed by default, BUT crucially it is not installed in the server distribution. So the answer is around 06:25 on a server and about 07:35 on a desktop.


1

You didn't post the actual name of the script you are trying tun run, but chances are it contains a dot ('.'), like if it is ending in '.sh'. run-parts will not run scripts which contain anything else but alphanumerical characters or hyphens. Remove the dot and you are fine.


1

According to man dh_installcron: --name=name Look for files named debian/package.name.cron.* and install them as etc/cron.*/name, instead of using the usual files and installing them as the package name. So name your debian/package-name.foobar.cron.d, and add to debian/rules: override_dh_installcron: dh_installcron --name=foobar


1

I have three solution suggestions for you. Invoke the crontab with crontab -e -u root Make sure that you have an empty line at the end of the cronjob file, meaning that every line ends with a newline. You might need to redirect the output to devnull: shutdown -r now > /dev/null Here are two helpful webpages for cronjobs: CRON Tester CRON Generator ...



Only top voted, non community-wiki answers of a minimum length are eligible