Ubuntu Schedule a cron Job for Specific Range of Time — December 14, 2017

Ubuntu Schedule a cron Job for Specific Range of Time

Schedule a Job for Specific Range of Time
MIN HOUR DOM MON DOW CMD

eg
30 08 10 06 * /home/ramesh/full-backup

30 – 30th Minute
08 – 08 AM
10 – 10th Day
06 – 6th Month (June)
* – Every day of the week



better explanation
# 1. Entry: Minute when the process will be started [0-60]
# 2. Entry: Hour when the process will be started [0-23]
# 3. Entry: Day of the month when the process will be started [1-28/29/30/31]
# 4. Entry: Month of the year when the process will be started [1-12]
# 5. Entry: Weekday when the process will be started [0-6] [0 is Sunday] correct ubuntu documentation
#
# all x min = */x

So according to this your 5 8 * * 6 would run 8:05 every Saturday.
Advertisements
Ubuntu kill process by PID — November 20, 2017
Ubuntu move content to parent directory — October 3, 2017
Ubuntu Secure Boot error “Image failed to verify with *ACCESS DENIED* on startup — September 19, 2017

Ubuntu Secure Boot error “Image failed to verify with *ACCESS DENIED* on startup

After updating GRUB in Ubuntu I got this error and I was so afraid of this. But a YOUTUBE video helped me to recover from this. May this post can help you too.

I was using SAMSUNG laptop. Here is what we need to do.

Go to BIOS->BOOT

You will see an option ‘SECURE BOOT’ and you need to disable it. Also when you disable it you will see an other option appears named as ‘OS MODE SELECTION’. If you disable ‘SECURE BOOT’ and your OS still cant boot then you need to change the options given in ‘OS MODE SELECTION’.

Ubuntu add proxy with username, password and port — July 26, 2017

Ubuntu add proxy with username, password and port

I have tested this with Ubuntu 14.04
First go to system settings > Network > Network Proxy
and fill ‘Proxy’ and ‘Port’
Then click on ‘Apply system wide’

Now open apt.conf file

gksudo gedit /etc/apt/apt.conf

and add this

Acquire::http::proxy "http://username:password@proxy_ip:port/";
Acquire::https::proxy "https://username:password@proxy_ip:port/";
Acquire::ftp::proxy "ftp://username:password@proxy_ip:port/";
Acquire::socks::proxy "socks://username:password@proxy_ip:port/";

Take care of every semi-colon and slash. Save this,

Now open this ‘environment’ file. For this file you may need sudo password

nano /etc/environment

and add this

http_proxy="http://username:password@proxy_ip:port/"
https_proxy="https://username:password@proxy_ip:port/"
ftp_proxy="ftp://username:password@proxy_ip:port/"
socks_proxy="socks://username:password@proxy_ip:port/"

save file and then logout user to check settings. Use this command

set | grep -i proxy

and check if you see any variables now. If yes then you have successfully enabled proxy.
Now open firefox and check if it asks for password on startup. Then enter proxy username and password and Boom :).

Ubuntu wget scrap a website — July 23, 2017

Ubuntu wget scrap a website

$ wget \
     --recursive \
     --no-clobber \
     --page-requisites \
     --html-extension \
     --convert-links \
     --restrict-file-names=windows \
     --domains website.org \
     --no-parent \
         www.website.org/tutorials/html/

This command downloads the Web site www.website.org/tutorials/html/.

The options are:

  • –recursive: download the entire Web site.
  • –domains website.org: don’t follow links outside website.org.
  • –no-parent: don’t follow links outside the directory tutorials/html/.
  • –page-requisites: get all the elements that compose the page (images, CSS and so on).
  • –html-extension: save files with the .html extension.
  • –convert-links: convert links so that they work locally, off-line.
  • –restrict-file-names=windows: modify filenames so that they will work in Windows as well.
  • –no-clobber: don’t overwrite any existing files (used in case the download is interrupted and
    resumed).

You can read of original resource.

Ubuntu install missing packages — July 18, 2017