یک کار برنامه ریزی شده چیست؟
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
مستندات این بخش نحوه ایجاد و کار با وظایف برنامه ریزی شده را با استفاده از سرویس وظایف برنامه ریزی شده Google Maps Mobility نشان می دهد. مستلزم آشنایی با موارد زیر است:
منبع Task
که استفاده می کنید در gRPC و REST موجود است.
در Fleet Engine برای وظایف برنامه ریزی شده، یک وظیفه نشان دهنده یک فعالیت راننده است که یک محموله یا خدمات برنامه ریزی شده را برای مشتریان شما انجام می دهد. شما وظایفی را به مکان های توقف وسیله نقلیه که باید تکمیل شوند اختصاص می دهید و وسیله نقلیه به آن ایستگاه ها حرکت می کند.
یک کار دو حالت ممکن دارد، OPEN
یا CLOSED
. این حالت ها نشان می دهد که آیا وظیفه در سیستم فعال است یا خیر. همانطور که سفر برای یک کار فعال تکامل مییابد، این موضوع را با بهروزرسانی توقف خودرو مرتبط با کار، که در راه است یا وارد شده است، به Fleet Engine گزارش میدهید. هنگامی که راننده وظایف را انجام داد و از ایستگاه خارج شد، توقف را از لیست توقف های خودرو حذف می کنید. برای اطلاعات بیشتر در مورد وظایف و ارتباط آنها با توقفگاه ها و وسایل نقلیه، به وظایف برنامه ریزی شده در موارد ضروری Fleet Engine مراجعه کنید.
زندگی یک کار
برای ردیابی هر کار در Fleet Engine، ابتدا باید یک موجودیت Task
ایجاد کنید. برای مرجع به gRCP یا REST مراجعه کنید.
جدول زیر نمونه ای از جریان سرتاسر یک وظیفه ایجاد شده در سیستم شما و مراحل چرخه عمر آن در Fleet Engine را شرح می دهد. فرض میکند که Fleet Engine را راهاندازی کردهاید و وسیله نقلیهای برای این کار دارید و بهروزرسانیهای مکان در برنامه راننده فعال است. به Driver SDK: Scheduled tasks مراجعه کنید.
1 | وظایف ایجاد کنید. | در ابتدای چرخه کاری، توزیع کننده یا مدیر سرویس ابتدا یک مانیفست برای وظایف یا خدمات تحویل ایجاد می کند. از آنجا، سیستم شما سپس با استفاده از CreateTrip موجودیت های وظیفه را با فیلدهای مورد نیاز، مانند نوع کار و مکان ایجاد می کند. همچنین میتواند پیکربندیهای دیگری مانند پنجره زمانی هدف، اشتراکگذاری پیشرفت کار و ویژگیهای سفارشی را در این مرحله ارائه دهد. به ایجاد وظایف حمل و نقل و راهنماهای مرتبط مراجعه کنید. |
2 | وظایف را برنامه ریزی کنید. | وقتی کاری را برای تحویل برنامهریزی میکنید، درخواست بهروزرسانی وسیله نقلیه تحویلی را صادر میکنید، که سپس نهاد خودرو را با لیستی از توقفهای سفر بهروزرسانی میکند. شما به هر ایستگاه لیستی از وظایفی که باید در ایستگاه تکمیل شوند اختصاص می دهید. به به روز رسانی وظایف وسیله نقلیه تحویل مراجعه کنید. |
3 | پیشرفت کار را به روز کنید. | هنگامی که کار به یک ایستگاه تحویل اختصاص داده شد و در Fleet Engine فعال شد، سیستم شما با نزدیک شدن، رسیدن و تکمیل توقف، Fleet Engine را از پیشرفت خودرو مطلع میکند. با این اطلاعات، Fleet Engine می تواند مسیریابی و به روز رسانی وضعیت را در طول سفر و همچنین در طول روز برای وسیله نقلیه به بهترین نحو انجام دهد. به به روز رسانی وضعیت توقف خودرو مراجعه کنید. |
4 | سفرها را به اشتراک بگذارید | همزمان با شروع ناوبری فعال خودرو برای روز تحویل، می توانید اطلاعات سفر را با سهامداران علاقه مند به اشتراک بگذارید. Fleet Engine جزئیات کار و مکان وسیله نقلیه را به روش های زیر در اختیار ذینفعان علاقه مند قرار می دهد:- اطلاعات حمل و نقل برای مصرف کنندگان با این راه حل، مصرف کنندگان می توانند وضعیت بسته خود را به همراه اطلاعات مکان وسیله نقلیه که شما به آنها اجازه مشاهده می دهید، مشاهده کنند.
برای کارهای برنامه ریزی شده به اشتراک گذاری مصرف کننده مراجعه کنید. - اطلاعات وضعیت ناوگان برای مدیران با این راه حل، مدیران ناوگان می توانند مکان وسایل نقلیه تحویل و توقف آنها را در ناوگان شما در زمان واقعی تجسم کنند. اگر مسیر یک وسیله نقلیه مشخص باشد، مؤلفه نمای نقشه آن وسیله نقلیه را در حالی که در مسیر پیش بینی شده خود حرکت می کند، متحرک می کند.
به کتابخانه جاوا اسکریپت ردیابی ناوگان مراجعه کنید.
|
5 | کار را نهایی کنید. | شما وظایف حمل و نقل را در موتور ناوگان به روش های زیر نهایی می کنید:- بستن کار : بستن یک کار حمل و نقل نشان می دهد که آن کار دیگر فعال نیست.
- نتیجه کار را تنظیم کنید : هنگامی که یک کار بسته شد، یک کار موفق یا ناموفق را نشان میدهید تا نشان دهید که آیا تحویل انجام شده است یا خیر. این بخش مهمی از نهایی کردن یک کار برای نشان دادن نتیجه تحویل در تجربه مصرف کننده شما و اطمینان از صورتحساب صحیح برای سرویس Fleet Engine است.
به خاطر داشته باشید که مانند وسایل نقلیه تحویل، نهادهای وظیفه بدون در نظر گرفتن وضعیت به مدت 7 روز در Fleet Engine فعال می مانند و در این مرحله حذف می شوند. به نهایی کردن وظایف مراجعه کنید. |
جریان توالی کار
نمودار زیر یک جریان دقیق از چرخه عمر کار را نشان می دهد.

بعدش چی
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-08-29 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-08-29 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eThis documentation outlines how to create and manage scheduled tasks, representing driver activities, within the Google Maps Mobility scheduled tasks service.\u003c/p\u003e\n"],["\u003cp\u003eTasks, which can be either OPEN or CLOSED, are assigned to vehicle stops, and their progress is updated as the vehicle travels to and completes these stops.\u003c/p\u003e\n"],["\u003cp\u003eThe lifecycle of a task involves creation, scheduling by assigning to a vehicle stop, updating progress, sharing journey details with stakeholders, and finalization by closing and setting the outcome.\u003c/p\u003e\n"],["\u003cp\u003eFleet Engine provides tools for consumers to track shipment status and for administrators to monitor fleet locations and progress in near real-time.\u003c/p\u003e\n"],["\u003cp\u003eTo successfully use this service, prior familiarity with Fleet Engine, vehicle basics for on-demand services, and task basics for scheduled tasks is assumed.\u003c/p\u003e\n"]]],[],null,["# What is a scheduled task?\n\nThe documentation in this section shows how to create and work with scheduled\ntasks using the Google Maps Mobility scheduled tasks service. It assumes\nfamiliarity with the following:\n\n- **Fleet Engine** : You should be familiar with Fleet Engine implementation details, request mechanisms, and security. For that, see [What is the Fleet\n Engine service?](/maps/documentation/mobility/fleet-engine/essentials) and the security topics in [Set up Fleet Engine](/maps/documentation/mobility/fleet-engine/essentials/set-up-fleet).\n- **Vehicles basics** for on-demand services. See [Introduction to vehicles](/maps/documentation/mobility/fleet-engine/essentials/vehicles-intro).\n- **Task basics** for scheduled task services. See [Scheduled tasks](/maps/documentation/mobility/fleet-engine/essentials/tasks-intro)\n\nThe `Task` resource that you'll use is available in both [gRPC](/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#task) and\n[REST](/maps/documentation/mobility/fleet-engine/reference/tasks/rest/v1/providers.tasks).\n\nIn Fleet Engine for scheduled tasks, a task represents a driver activity that\nfulfills a scheduled shipment or service for your consumers. You assign tasks to\nvehicle stop locations where they are to be completed, and the vehicle travels\nto those stops.\n\nA task has two possible states, `OPEN` or `CLOSED`. These states indicate\nwhether the task is active or not in the system. As the journey evolves for an\nactive task, you report this to Fleet Engine by updating the vehicle stop\nassociated with the task, which is either ENROUTE or ARRIVED. Once the driver\ncompletes tasks and leaves the stop, you remove the stop from the list of stops\non the vehicle. For more about\ntasks and their relationship to stops and vehicles, see\n[Scheduled tasks](/maps/documentation/mobility/fleet-engine/essentials/tasks-intro#basic_task_fields) in **Fleet Engine essentials** .\n\nLife of a task\n--------------\n\nIn order to track each task in Fleet Engine, you must first create a `Task`\nentity. See either [gRCP](/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#task) or [REST](/maps/documentation/mobility/fleet-engine/reference/tasks/rest/v1/providers.tasks) for reference.\n\nThe following table describes an example end-to-end flow of a task created in\nyour system and its lifecycle stages in Fleet Engine. It assumes you have set up\nFleet Engine and have a vehicle for the task, with location updates\nenabled in the driver app. See [Driver SDK: Scheduled tasks](/maps/documentation/mobility/driver-sdk/scheduled).\n\n|---|-------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| 1 | **Create tasks.** | At the beginning of the work cycle, the dispatcher or service administrator first creates a manifest for delivery tasks or services. From there, your system then creates the task entities using `CreateTrip` with required fields, such as the type of task and the location. It can also supply other configurations at this point, such as target time window, sharing task progress, and custom attributes. See [Create shipment tasks](/maps/documentation/mobility/fleet-engine/journeys/tasks/create-shipment-tasks) and the related guides. |\n| 2 | **Schedule tasks.** | When you schedule a task for delivery, you issue a delivery vehicle update request, which then updates the vehicle entity with a list of stops to travel. You assign each stop a list of tasks to be completed at the stop. See [Update delivery vehicle tasks](/maps/documentation/mobility/fleet-engine/journeys/tasks/update-tasks). |\n| 3 | **Update the task progress.** | Once the task is assigned to a delivery stop and active in Fleet Engine, your system notifies Fleet Engine about the vehicle progress as it approaches, arrives at, and completes the stop. With this information, Fleet Engine can best perform routing and status updates along the journey as well as throughout the day for the vehicle. See [Update vehicle stop status](/maps/documentation/mobility/fleet-engine/journeys/tasks/update-stops). |\n| 4 | **Share journeys.** | At the same time that the vehicle begins active navigation for the delivery day, you can share journey information with interested stakeholders. Fleet Engine makes both task details and vehicle location available to interested stakeholders in the following ways: - **Shipment information for consumers** . With this solution, consumers can see the status of their package along with the vehicle location information you permit them to view. See [Consumer sharing for scheduled tasks](/maps/documentation/mobility/journey-sharing/scheduled). - **Fleet status information for administrators** . With this solution, fleet administrators can visualize the locations of delivery vehicles and their stops in your fleets in near real time. If the route for a vehicle is known, the map view component animates that vehicle as it moves along its predicted path. See the [JavaScript Fleet Tracking library](/maps/documentation/mobility/operations/fleet-tracking). |\n| 5 | **Finalize the task.** | You finalize shipment tasks in Fleet engine in the following ways: - **Close the task**: Closing a shipment task indicates that that task is no longer active. - **Set the task outcome**: Once a task is closed, you indicate either a successful or failed task to indicate if the delivery took place or not. This is an important part of finalizing a task to show the delivery outcome in your consumer experience and to ensure correct billing for the Fleet Engine service. Keep in mind that, like delivery vehicles, task entities remain active within Fleet Engine for 7 days regardless of state, at which point they are removed. See [Finalize tasks](/maps/documentation/mobility/fleet-engine/journeys/tasks/finalize-tasks). |\n\nTask sequence flow\n------------------\n\nThe following diagram shows a detailed flow of a task lifecycle.\n\nWhat's next\n-----------\n\n- [Create shipment tasks](/maps/documentation/mobility/fleet-engine/journeys/tasks/create-shipment-tasks)"]]