Creative Tools interview exercise
Project description
# tasker
## Creative Tool Test
## Easy Job Scheduler
We want you to write a simple program that is able to execute a task which may or may not have dependencies on other tasks to be executed before.
A task is executed at the command line and is defined in a regular text ASCII file as follows:
the name of the task
the command of the task
a comma-separated list of task dependencies
For Example:
A.task:
> A echo ‘I am task A’`
B.task:
> B echo ‘I am task B’
C.task:
> C echo ‘I am task C’ A, B
The program is invoked to execute the task(s) thus:
> ./job_scheduler <task_to_be_done> [TASK_FILE_0, …]
where first argument <task_to_be_done> it is the name of the task to be run and the other argument are file paths of the task definition files.
So, with the given task sample files, you might run for example:
> ./job_scheduler A A.task B.task C.task I am A
> ./job_scheduler C A.task B.task C.task I am A I am B I am C
> ./job_scheduler B A.task C.task Error!
### Delivery:
You are expected to deliver your solution in a gitlab, github or bitbucket repository accessible to us. The commit history of the repo will form part of our analysis of your work.
### General Notes:
This exercise should not take you more than 5 hours.
You are expected to write testable and documented code where you explain the design and the implementation.
The C++ code and its compilation process should be as portable as possible.
Specifically:
you are free to adopt data structure and algorithms you see fit the purpose.
you can use the C++ standand level you prefer (C++11, C++14, C++17)
you can make use of std::system in <cstdlib> for executing the command of a task or you are free to use other framework.
you are free to use external libraries as far as those are portable, you understand clearly what they do and you are able to argument the reason of why you choose them before other approaches.
In your interview we will discuss your solution, its corner cases, possible pitfall, test case that you did not handle, and any sort of future improvements that you or us see as valid or important.
Good Luck!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file ct-tasker-0.1.tar.gz
.
File metadata
- Download URL: ct-tasker-0.1.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04e3192ffbb64f7fdd119ce28fc8e4f3fc6da974656ffdc8c6d08b0178793517 |
|
MD5 | 3fb87d1f589f393c3c1ee6028634ff3b |
|
BLAKE2b-256 | 730c975f3652c25d7d6d38e4dd58925d1829a29993c7cbc384d8cbaa6c25482e |