# Import times
Every day @ 12:00 we query the job time endpoint to get all job costs.
Job Time Import (opens new window)
The Job time list endpoint is: https://api.workflowmax.com/time.api/list)
The individual job endpint is: https://api.workflowmax.com/job.api/costs/
The SQL query to empty the costs database is:
TRUNCATE `Times`
The SQL query to empty the costs database is:
TRUNCATE `TimeTotals`
The query to add all time entries to our database is:
INSERT INTO `Times` (`db_id`,`Job_ID`, `Job_Name`, `Task_Id`, `Task_Name`, `Staff_ID`, `Staff_Name`, `Date`, `Minutes`, `Note`, `Billable`) VALUES ('', '$jobID', '$jobName', '$taskId', '$dept', '$staffID', '$staffName', '$date', '$minutes', '$note', '$billable')
This is the cron that triggers the script: Job time import cron script (opens new window)