CLI and Cron
-
Hey there..
I'd like to run a cron job that imports videos from a YouTube channel..
Is cron part of this package? If so, can I use the 'peertube' command as part of a cron job?
If not, is there a way to get cron up and running?
Thanks so much for all your efforts.
Cheers,
Lorne -
@lorneg currently there is no cron running for that app package. I guess we can add that for the next package release.
What would be your peertube cli command to put into the cron job? Just so we can ensure your use-case is covered correctly then.
-
Hey mate.. Sorry! I just realised you'd replied.
I imagine the crontab would look something like this:
0 2 * * * peertube import -u 'https://XXXXX' -U 'XXXXX' --password 'XXXXX' --target-url 'https://www.youtube.com/channel/XXXXX' --since $(date --date="-1 days" +%Y-%m-%d) --tmpdir /tmp
Let me know if you see anytihg weird there, or if you need any more info.
Thanks again!
-
@nebulon said in CLI and Cron:
@lorneg currently there is no cron running for that app package. I guess we can add that for the next package release.
That would be an excellent idea!
BTW, can't we just write and run crontab from the CLI on the app terminal interface?Andy
-
@girish said in CLI and Cron:
I think a general way to run cron jobs possibly per app would be useful. I have made a task for the next release - https://git.cloudron.io/cloudron/box/-/issues/793
Useful, indeed for non-techie folks because crontab is not obvious at all one is not sysadmin.
Andy
-