当我使用 crontab 进行“cargo run”时,rust 文件无法正常工作
我输入sudo -i以继续编辑 crontab 的命令。 我在 crontab 文件中写了以下行。 @reboot cd /home/username/superuser && cargo run; 以下内容属于main.rs普通货物。 use std::fs; fn main() { let data = "rust language"; fs::write("/home/username/foo", data).expect("Unable to write file"); } 当我重新启动计算机时,实际上该文件fo...