How to add and view tasks in Cron Job ?

ubuntu

Add / View – Cron Jobs Servers can automatically perform tasks that you would otherwise have to perform yourself, such as running scripts. On Linux servers, the cron utility is the preferred way to automate the running of scripts. In this article we’ll cover how to view the jobs scheduled in the crontab list View Cron Job Lists crontab -l View Cron Job Lists for Selected User crontab -u <<User Name>> -l SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root # For details see man 4 crontabs # Example of job definition: # .—————- minute (0 – 59)…

Read More

How to test mobile speed performance ?

Test mobile speed performance :- Google Page Speed Page Speed Insights indicates whether your site page’s code reflects standard best practices. It fetches the url with a mobile user-agent and identifies issues such as large images, render-blocking JS, and lack of browser caching. The PageSpeed Score ranges from 0 to 100 points. A higher score is better and a score of 85 or above indicates that the page adheres well to best practices. Web page Test WebPageTest helps you deepdive into issues affecting load time. You can simulate many device…

Read More

How to get last one hour data in MySQL ?

Last one Hour data in MySQL ? Example :- select o.code, o.customerId, c.name, c.email from `Order` o’; join Customer c on c.id = o.customerId ‘; where o.orderDate >= DATE_SUB(NOW(),INTERVAL <<SYNTAX>> HOUR) order by o.id limit 0, 2 Example :- select o.code, o.customerId, c.name, c.email from `Order` o’; join Customer c on c.id = o.customerId ‘; where o.orderDate >= DATE_SUB(NOW(),INTERVAL 1 HOUR) order by o.id limit 0, 2

Read More

How to import table from other database in MySQL

Import a record from other Database How to import a record from another database table in mysql ? Same Table Structure in Source and Destination Table INSERT INTO <TABLENAME> SELECT * FROM <DESTINATION DATABASENAME>.<TABLENAME> Transfer from Limited Fields INSERT INTO <TABLENAME> (col1, col2) SELECT (col1, col2) FROM <DESTINATION DATABASENAME>.<TABLENAME> Transfer from Limited Fields with Condition INSERT INTO <TABLENAME> (col1, col2) SELECT (col1, col2) FROM <DESTINATION DATABASENAME>.<TABLENAME> where condition.field = condition.value

Read More

How to import CSV file into Table in MySQL ?

Import CSV File into MySQL Table This below example shows you how to use the LOAD DATA INFILE statement to import CSV file into MySQL table. The LOAD DATA INFILE statement allows you to read data from a text file and import the file’s data into a database table very fast. Before importing the file, you need to complete the following steps : 1) Data Import table should be created 2) CSV Columns Should be match with the Database Table. 3) Access required to execute the query LOAD DATA INFILE…

Read More

Insert a row no in new column in MySQL

Add a row no. in new column Update a column with record row no in MySQL Execute the below query in Mysql to update an row no. in the specified column   My Sql Query Example  SET @pos := 0 UPDATE userinfo SET fuserid = ( SELECT @pos := @pos + 1 ) ORDER BY updated_at DESC @pos -> Variable Name userinfo -> Table Name fuserid -> Column Name

Read More