APIs -> SQL Connect
SQL Connect
This function is used to build a data connection between the customer's existing database (such as: Oracle, MySQL, Postgresql) and CubeDrive.
The system will fetch data from the table according to the SQL and insert them into the form.
Add a new connect
To add a new connect, you need to login as the system administrator and come to adminConsole page.
In the settings page, you can click "Database connection" to start it.
- Database URL: jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=UTC
- Query SQL: SELECT name, email, address, age FROM user WHERE age > 18
- Run time (cron format): 0 15 10 ? * *
Tip: you need have the connected database information: such as: url, username, password etc.
Cron job format
A cron expression is a string consisting of six or seven subexpressions (fields) that describe individual details of the schedule.
- Seconds Minutes Hours DayofMonth Month DayofWeek Year
- Seconds Minutes Hours DayofMonth Month DayofWeek
Field |
Value |
Special char |
Seconds |
0~59 |
, - * / |
Minutes) |
0~59 |
, - * / |
Hours) |
0~23 |
, - * / |
DayofMonth |
1~31 |
,- * ? / L W C |
Month |
1~12 |
, - * / |
DayofWeek |
1~7 or SUN-SAT (1=SUN) |
, - * ? / L C # |
Year |
1970~2099 |
, - * / |
Here are some examples:
- 0 0 12 * * ? Fire at 12:00 PM (noon) every day
- 0 15 10 ? * * Fire at 10:15 AM every day
- 0 15 10 * * ? 2005 Fire at 10:15 AM every day during the year 2005
- 0 0/5 14 * * ? Fire every 5 minutes starting at 2:00 PM and ending at 2:55 PM, every day
- 0 * 14 * * ? Fire every minute starting at 2:00 PM and ending at 2:59 PM, every day
- 0 0-5 14 * * ? Fire every minute starting at 2:00 PM and ending at 2:05 PM, every day
- 0 10,44 14 ? 3 WED Fire at 2:10 PM and at 2:44 PM every Wednesday in the month of March
- 0 15 10 ? * MON-FRI Fire at 10:15 AM every Monday, Tuesday, Wednesday, Thursday and Friday
- 0 15 10 15 * ? Fire at 10:15 AM on the 15th day of every month
- 0 15 10 L * ? Fire at 10:15 AM on the last day of every month
« Token
Excel to online sheet »