w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to give user input in cronjob script

If it's taking the input from stdin, make another script that will call your script with a pipe or a redirect.

/foo/bar/my_command < my_input

You can also launch it as a shell command in your crontab:

0 * * * * /bin/sh -c "/foo/bar/my_command < my_input"

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.