---
name: "gfarm_url_hosts_schedule"
section: "3"
platform: "linux"
package: "libgfarm-dev"
version: "2.4.1-1.1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/gfarm_url_hosts_schedule"
---

# gfarm\_url\_hosts\_schedule(3)

schedule filesystem nodes using file-affinity scheduling

## NAME

gfarm\_url\_hosts\_schedule - schedule filesystem nodes using file-affinity scheduling

## SYNOPSIS

**#include \<gfarm/gfarm.h\>**

**char \*gfarm\_url\_hosts\_schedule (char \*** *gfarm\_url***, char \*** *option***, int \*** *nhostsp***, char \*\*\*** *hostsp***);**

## DESCRIPTION

The **gfarm\_url\_hosts\_schedule()** function schedules filesystem nodes using file-affinity scheduling with a Gfarm file *gfarm\_url*, and returns an array of filesystem hostnames *hostsp* and the number of scheduled hosts *nhostsp*.  The returned array of hostnames *hostsp* should be free'ed with [gfarm\_strings\_free\_deeply(3)](/gfarm_strings_free_deeply/3.md).

## RETURN VALUES

- **NULL**

  The function terminated successfully.

- **GFARM\_ERR\_NO\_MEMORY**

  Insufficient memory was available.

- **Others**

  An error except the above occurred.  The reason is shown by its pointed strings.

## NOTES

The argument *option* is reserved to specify options for scheduling, although it is not used in the current implementation.
